Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,3 @@
fcn f(text,p){ if(text.find(p)==0)println("Yep") else println("Nope") }
f("foobar","foo") //--> Yep
f("foobar","bar") //--> Nope

View file

@ -0,0 +1,3 @@
fcn f(text,p){ if(Void!=(n:=text.find(p)))println("Contained @",n) else println("Nope") }
f("foobar","ob") //--> Contained @2
f("foobar","food") //--> Nope

View file

@ -0,0 +1,7 @@
fcn f(text,p){
if( Void!=(n:=text.rfind(p)) and n+p.len()==text.len() )
println("tail gunner") else println("Nope")
}
f("foobar","r"); f("foobar","ar"); //--> tail gunners
f("foobar","ob"); //--> Nope
f("foobarfoobar","bar"); //--> tail gunner