Re:Best aspects of C
by ncmncm on Tuesday November 17, 2020 @06:00PM
(#25131081)
One word: strtok
It takes more code to use it correctly than to hand-code what you think it is supposed to be doing for you. strtok is Cursed.
strlcpy is similar. If you don't write that much more code, you are not using it correctly, and it is not giving you the value that is the reason you thought was why you were using it.
It takes more code to use it correctly than to hand-code what you think it is supposed to be doing for you. strtok is Cursed.
strlcpy is similar. If you don't write that much more code, you are not using it correctly, and it is not giving you the value that is the reason you thought was why you were using it.