Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
johnisgood
on Dec 15, 2018
|
parent
|
context
|
favorite
| on:
String tokenization in C
> The point is that strtok is not a good choice even for single-threaded code.
Why isn't it a good choice exactly? Could you sum it up?
enriquto
on Dec 15, 2018
[–]
Maybe he means that the function is not re-entrant. You cannot run a loop that tokenizes a string, and somewhere inside, you call a function that uses strtok itself. This can happen inadvertently.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Why isn't it a good choice exactly? Could you sum it up?