S
Sheldon
Hi Everyone,
I have a file with a set of strings per line and each line ends with a
'\n' and each string separated by a whitespace.
After reading each line and using strtok() to split the string into 3
strings, the last string is saved with the '\n' character still
attached. I would like to know if strtok can be used to fix this
problem or do I have to use strlen and and if statement to solve this?
Any help is appreciated!
/S
I have a file with a set of strings per line and each line ends with a
'\n' and each string separated by a whitespace.
After reading each line and using strtok() to split the string into 3
strings, the last string is saved with the '\n' character still
attached. I would like to know if strtok can be used to fix this
problem or do I have to use strlen and and if statement to solve this?
Any help is appreciated!
/S