Talk:Strtok

From SA-MP Wiki

Jump to: navigation, search

I've changed this to my self-written strtok - since all claimed, strtok was thaaat bad/slow/whatever, I once decided to make a new one back in 0.1 days, and have been using that so far. I've tested if it's faster with some random strings, and it uses only 25% (4x as fast) of the time the old strtok did.--mabako 21:38, 4 November 2007 (CET)

What is MAX_STRTOK_VALUE? --IJzerenRita 01:40, 5 November 2007 (CET)
30 (as for normal strtok), I made that originally so you can use longer strtok-strings.--mabako 15:02, 5 November 2007 (CET)
If you make the separator restricted to only single characters (as will often be the case) you can use my chrfind function instead of strfind which is MUCH faster for single characters.
Also, I've not tested this but could you confirm what happens when you enter a string longer than 30 characters? It looks like it will return the first 30 but will return the index at the end of those 30 characters, not after the complete word as would be expected behaviour, thus giving some very odd results IMHO--Y_Less 13:11, 24 November 2007 (GMT)
Personal tools
Navigation
Toolbox