Help with strtok
#4

Quote:
Originally Posted by xLowrider
This?
Код:
strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}
Above it.
Reply


Messages In This Thread
Help with strtok - by xLowrider - 04.12.2009, 09:21
Re: Help with strtok - by Abernethy - 04.12.2009, 09:34
Re: Help with strtok - by xLowrider - 04.12.2009, 09:37
Re: Help with strtok - by Abernethy - 04.12.2009, 09:40
Re: Help with strtok - by xLowrider - 04.12.2009, 09:47
Re: Help with strtok - by Correlli - 04.12.2009, 09:50
Re: Help with strtok - by xLowrider - 04.12.2009, 09:59
Re: Help with strtok - by Abernethy - 04.12.2009, 10:15
Re: Help with strtok - by xLowrider - 04.12.2009, 10:19
Re: Help with strtok - by Abernethy - 04.12.2009, 10:22

Forum Jump:


Users browsing this thread: 1 Guest(s)