CFStringTokenizerCreate(_:_:_:_:_:)
Returns a tokenizer for a given string.
Declaration
func CFStringTokenizerCreate(_ alloc: CFAllocator!, _ string: CFString!, _ range: CFRange, _ options: CFOptionFlags, _ locale: CFLocale!) -> CFStringTokenizer!Parameters
- alloc:
The allocator to use to allocate memory for the new object. Pass
NULLor Kcfallocatordefault to use the current default allocator. - string:
The string to tokenize.
- range:
The range of the characters in
stringto tokenize. - options:
A tokenization unit option that specifies how
stringshould be tokenized. The options can be modified by adding unit modifier options to tell the tokenizer to prepare specified attributes when it tokenizesstring. For possible values, see 1588024 Tokenization Modifiers. - locale:
A locale that specifies language- or region-specific behavior for the tokenization. You can pass
NULLto use the default system locale, although this is typically not recommended—instead use Cflocalecopycurrent() to specify the locale of the current user. For more information, see 1588024 Tokenization Modifiers.
Return Value
A tokenizer to analyze the range range of string for the given locale and options. Ownership follows the The Create Rule.