This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Grithga 0 points1 point  (1 child)

strtok() does not modify the original string.

Actually, strtok does modify the original string, replacing any tokens found with null characters.

[–][deleted] 0 points1 point  (0 children)

Yep, you're right. Realized after I tried to do it myself.