What you're looking for is an InStr function. A command that is curiously missing in DarkBasic, although present in most other BASIC languages.
function Instr(source$,check$,startpos,ignorecase)
rem --- Requires Midstr() function
if ignorecase
source$ = lower$(source$)
check$ = lower$(check$)
endif
repeat
if Midstr(source$,startpos,len(check$)) = check$ then exitfunction startpos
inc startpos,1
until startpos > len(source$)
endfunction 0
function Midstr(source$,pos,length)
rem --- a slightly extended version of mid$()
rem --- where you can set the length of return
t$ = left$(right$(source$,len(source$)-(pos-1)),length)
endfunction t$
example:
print InStr("Dingy New York Yankee's Baseball Cap", "Dingy", 1, 0)
Will return the position of the check word within string or 0 if not present.
"Earth is the cradle of humanity,
but one cannot live in a cradle forever"
Konstantin E. Tsiolkovsky (1911)