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

4 lines
211 B
Raku

$haystack.starts-with($needle) # True if $haystack starts with $needle
$haystack.contains($needle) # True if $haystack contains $needle
$haystack.ends-with($needle) # True if $haystack ends with $needle