RosettaCodeData/Task/String-matching/K/string-matching-2.k

15 lines
225 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
startswith["abcd";"ab"]
1
startswith["abcd";"bc"]
0
endswith["abcd";"cd"]
1
endswith["abcd";"bc"]
0
contains["abcdef";"cde"]
1
contains["abcdef";"bdef"]
0
_ss["abcdabceabc";"abc"] / location of matches
0 4 8