Nestharus
o-o
- Reaction score
- 84
JASS:
library FindString
function FindString takes string str, string strToFind, integer start returns integer
local integer i=start
local integer l=StringLength(str)
local integer l2=StringLength(strToFind)
loop
exitwhen i>l-l2
if (SubString(str,i,i+l2)==strToFind) then
return i
endif
set i=i+1
endloop
return -1
endfunction
endlibrary