Skip to content

Commit

Permalink
Add indices() as a sub
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Aug 4, 2015
1 parent d11c710 commit 45f2924
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/Cool.pm
Expand Up @@ -322,6 +322,10 @@ sub uc(Cool $s) { $s.uc }
sub tc(Cool $s) { $s.tc }
sub tclc(Cool $s) { $s.tclc }

sub indices(Cool $s,$needle,$pos=0,:$overlap) {
$s.indices($needle,$pos,:$overlap);
}

proto sub rindex($, $, $?) is pure { * };
multi sub rindex(Cool $s, Cool $needle, Cool $pos) { $s.rindex($needle, $pos) };
multi sub rindex(Cool $s, Cool $needle) { $s.rindex($needle) };
Expand Down

0 comments on commit 45f2924

Please sign in to comment.