RosettaCodeData/Task/String-matching/Zkl/string-matching-1.zkl

4 lines
129 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
fcn f(text,p){ if(text.find(p)==0)println("Yep") else println("Nope") }
f("foobar","foo") //--> Yep
f("foobar","bar") //--> Nope