Idontknowyou
New Member
- Reaction score
- 33
I cannot find this condition in the list, does it exist? if not, what can i do instead?
function StringContainsString takes string str, string partial returns boolean
//Returns true if the full string is contained inside. Capitalization matters!
local integer i = 0
local integer l = StringLength(partial)
local integer l2 = StringLength(str)
loop
exitwhen i > l2
if SubString(str,i,i+l) == partial then
return true
endif
set i = i + 1
endloop
return false
endfunction