RosettaCodeData/Task/String-matching/Perl-6/string-matching-2.pl6

4 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