( MATCHC find substring in string ) need j need pick need roll : matchc ( adr1 n1 adr2 n2 --- adr3 f ) swap dup c@ 5 pick 5 roll + ( adr1 n2 adr2 b adr1+n1 --- ) dup 1 swap 6 pick - 1+ 7 roll do 3 pick i c@ = ( search for b in string) if 0 6 pick 1 do ( found, compare rest) j i + c@ 6 pick i + c@ ( fetch next search byte) = 0= ( do they match?) if drop 1 leave endif ( no, resume search) loop ( yes, continue comparing) if else drop drop i 4 pick + 0 ( if entire string is found) leave endif endif ( then quit) loop rot drop rot drop rot drop ( discard b addr2 and n2) ;