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

4 lines
96 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
startswith: {:[0<#p:_ss[x;y];~*p;0]}
endswith: {0=(-#y)+(#x)-*_ss[x;y]}
contains: {0<#_ss[x;y]}