I am using C90, and I want to read a string that looks something like this:
str = " INFO INFO INFO INFO"
INFO is a word without white spaces in it. I want to know, what is the best way to read the first INFO word?
The problem is that there could be any number (up to 166) of whitespace characters before the INFO, but a white space character is also what marks the end of the INFO word. So I need to ignore the whitespaces before it, but stop reading at a white space after it.
Is there a function that can do it? Or do I need to write it myself?
And if I write it myself, do I actually need an if statement that looks like "character != '\t' && character != " " && character != ....
"?
or there is a way to tell the language x == whitespace
?