RosettaCodeData/Task/String-matching/Perl-6/string-matching-2.pl6
2016-12-05 22:15:40 +01:00

3 lines
208 B
Raku

so $haystack ~~ /^ $needle / # True if $haystack starts with $needle
so $haystack ~~ / $needle / # True if $haystack contains $needle
so $haystack ~~ / $needle $/ # True if $haystack ends with $needle