- Joined
- Jan 7, 2008
- Messages
- 45
I would like to know if there is a way to detect parts of a string (Not substring), i'm talking a boolean comparison, where if a string i define contains something else i define as a substring, then it returns true, otherwise it returns false.
Not that i wouldn't be able to make it by using loops, i would just really like to know, so you won't have to guide me if there's no way
Well... i solved it while waiting, and for anyone interested i used this method:
In this example i am scanning for the keyword missile
Not that i wouldn't be able to make it by using loops, i would just really like to know, so you won't have to guide me if there's no way
Well... i solved it while waiting, and for anyone interested i used this method:
JASS:
loop
set udg_Ok=0
set udg_N=0
exitwhen udg_N>StringLength(<string>)
set udg_N=udg_N+1
if (SubString(<string>,udg_N,udg_N+7)=="Missile") then
set udg_Ok=1
endif
endloop
Last edited: