Comment by timmattison
1 year ago
I haven’t used strtok in a long time but my recollection is that it mutates the original string by placing a NULL value at the next delimiter so “hello world” would become “hello<0x00>world” if splitting on spaces. This lets you loop with the same string passed to strtok until it is done.
It’s ugly. Would not recommend. 0/10
No comments yet
Contribute on Hacker News ↗