Advances the tokenizer to the next token and sets that as the current token.
SDKs
- iOS 3.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Foundation
Declaration
func CFStringTokenizerAdvanceToNextToken(_ tokenizer: CFString Tokenizer!) -> CFString Tokenizer Token Type
Parameters
tokenizer
A CFStringTokenizer object.
Return Value
The type of the token if the tokenizer succeeded in finding a token and setting it as current token. Returns k
if the tokenizer failed to find a token. For possible values, see CFString
.
Discussion
If there is no preceding call to CFString
or CFString
, the function finds the first token in the range specified by the CFString
. If there is a preceding, successful, call to CFString
or CFString
and there is a current token, proceeds to the next token. If a token is found, it is set as the current token and the function returns true
; otherwise the current token is invalidated and the function returns false
.
You can obtain the range and attribute of the token calling CFString
and CFString
. If the token is a compound (with type k
or k
), you can obtain its subtokens and (or) derived subtokens by calling CFString
.