Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Str.starts-with
  • Loading branch information
moritz committed Apr 10, 2015
1 parent 796181f commit a2b0e77
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/Type/Str.pod
Expand Up @@ -336,6 +336,15 @@ Special case: sprintf("<b>%s</b>\n", "Perl 6") will not work use either of the
sprintf "<b>\%s</b>\n", "Perl 6";
sprintf "<b>%s\</b>\n", "Perl 6";
=head2 method starts-with
multi method starts-with(Str:D: Str(Cool) $needle) returns True:D
Returns True if the invocant is identical to or starts with C<$needle>.
say "Hello, World".starts-with("Hello"); # True
say "http://perl6.org/".starts-with('ftp'); # False
=head2 method subst
multi method subst(Str:D: $matcher, $replacement, *%opts)
Expand Down

0 comments on commit a2b0e77

Please sign in to comment.