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

4 lines
129 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
fcn f(text,p){ if(text.find(p)==0)println("Yep") else println("Nope") }
f("foobar","foo") //--> Yep
f("foobar","bar") //--> Nope