Using idx in strtok
#1

I see the following alot in scripts:
Код:
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
	SendClientMessage(playerid, COLOR_WHITE, "USAGE: /command [correct parameters]");
	return 1;
}
Its used to recognize if commands are used correctly. If I'am correct it splits (tokenize) the command with strtok and then count the characters behind the command itself to check if parameters are filled in correctly. But I got no idea what idx stands for... Because on the place where where idx is standing there should be filled in the chars where to "split" the string, right?

So to be clear, my question is: What does idx, and where does it stand for?
I hope someone can explain this to me.

Thanks in advance!

-----
Accesteam
Reply


Messages In This Thread
Using idx in strtok - by Accesteam - 05.01.2009, 15:00
Re: Using idx in strtok - by Accesteam - 05.01.2009, 16:15
Re: Using idx in strtok - by Micko9 - 20.03.2010, 17:42
Re: Using idx in strtok - by bilakispa - 20.03.2010, 18:41

Forum Jump:


Users browsing this thread: 3 Guest(s)