The CFStringTokenizer documentation has two conflicting statements in CFStringTokenizerAdvanceToNextToken():
CFStringTokenizerAdvanceToNextToken
...
Return Value
The type of the token if the tokenizer succeeded in finding a token and setting it as current token. Returns kCFStringTokenizerTokenNone if the tokenizer failed to find a token. For possible values, see “Token Types.”
...
If a token is found, it is set as the current token and the function returns true; otherwise the current token is invalidates and the function returns false.
The first paragraph (returning a token type) is what I'd like to see: it lets you, for example, check if a token is made up entirely of non-alphanumeric characters. However, the second paragraph (returning true or false) seems to be what is actually happening.
Any ideas why that would be, or how to work around it?