RosettaCodeData/Task/String-matching/Raku/string-matching-2.raku

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