String tokenization in C
onebyezero.blogspot.com
String tokenization in C
1–10 of 117 posts
Re: String tokenization in C
#2Re: String tokenization in C
#3Re: String tokenization in C
#4It used to be that gcc will warn against strtok and recommend strsep instead. Do not know what the status is today
Re: String tokenization in C
#5It used to be that gcc will warn against strtok and recommend strsep instead. Do not know what the status is today
Strtok is not thread safe and can’t be made thread safe without changing the API. You should not use it.
Well, there is already a thread-safe variant [0]: > The strtok() function uses a static buffer while parsing, so it's not thread safe. Use strtok_r() if this matters to you.
Re: String tokenization in C
#6Re: String tokenization in C
#7It used to be that gcc will warn against strtok and recommend strsep instead. Do not know what the status is today
Re: String tokenization in C
#8Re: String tokenization in C
#9Note though that strsep() is not as portable, because it is an extension to standard C.
Re: String tokenization in C
#10Note though that strsep() is not as portable, because it is an extension to standard C.
In fact, it's not even in POSIX .
1. https://www.gnu.org/software/libc/manual/html_node/Finding-T...