Creates an array of CFString objects from a single CFString object.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The allocator to use to allocate memory for the new CFArray object. Pass
kto use the current default allocator.
The string to be divided into substrings. The substrings should be separated by
The string used to separate the substrings in
A new array that contains CFString objects that represent substrings of
NULL if there was a problem creating the object. The order of elements in the array is identical to the order of the substrings in
separator does not occur in
the, the result is an array containing
separator is equal to
the, then the result is an array containing two empty strings. Ownership follows the The Create Rule.
This function provides a convenient way to convert units of data captured in a single string to a form (an array) suitable for iterative processing. One or more delimiter characters (or “separator string”) separates the substrings in the source string—these characters are frequently whitespace characters such as tabs and newlines (carriage returns). For example, you might have a file containing a localized list of place names with each name separated by a tab character. You could create a CFString object from this file and call this function on the string to obtain a CFArray object whose elements are these place names.
separator is treated as a complete unit. If you specify
XYZ as the separator string, then if
a, then the returned array contains