StrFind from pos1 to pos2
#3

strfind returns the position where the match is found, so:
pawn Код:
string = "123456789";
new pos = strfind(string, "5", true);
printf("%d", pos);
... would print 4.

So you can simply check if the return value is below your end position.

// Edit: Or maybe you mean what Vince posted. Hopefully either response is useful!
Reply


Messages In This Thread
StrFind from pos1 to pos2 - by Dragony92 - 19.09.2012, 16:35
Re: StrFind from pos1 to pos2 - by Vince - 19.09.2012, 16:57
Re: StrFind from pos1 to pos2 - by AndreT - 19.09.2012, 17:00
Re: StrFind from pos1 to pos2 - by Dragony92 - 19.09.2012, 17:14
Re: StrFind from pos1 to pos2 - by Vince - 19.09.2012, 17:30
Re: StrFind from pos1 to pos2 - by Dragony92 - 19.09.2012, 17:43

Forum Jump:


Users browsing this thread: 2 Guest(s)