3 lines
262 B
Perl
3 lines
262 B
Perl
index($str1, $str2) == 0 # true if $str1 starts with $str2
|
|
index($str1, $str2) != -1 # true if $str1 contains $str2
|
|
rindex($str1, $str2) == length($str1) - length($str2) # true if $str1 ends with $str2
|