News for hackers. Stuff that matters.
Re:The abominable strtok() by ComputerGuru on Friday September 24, 2010 @04:24PM (#1725279)
I think anyone that's done even a little bit of C work on any platform is aware of this issue.... but it's always worth griping over it some more. I guess the poster just ran into it and couldn't help but express his frustration :)

For Win32 developers who don't have the glib g_strsplit function, you can use strtok_s which is detailed on MSDN here: http://msdn.microsoft.com/en-us/library/ftsafwz3(VS.80).aspx

strtok_s is re-entrant, thread-safe, and uses no global data, but keep in mind it still modifies your input string.

There are no comments on this comment yet.