Copies a range of the Unicode characters from a string to a user-provided buffer.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
The string from which the characters are to be obtained.
The range of characters to copy. The specified range must not exceed the length of the string.
UniChar buffer of length
range.length that you have allocated on the stack or heap. On return, the buffer contains the requested Unicode characters.
Use this function to obtain some or all of the Unicode characters represented by a CFString object. If this operation involves a large number of characters, the function call can be expensive in terms of memory. Instead you might want to consider using the in-line buffer functions
CFStringGetCharacterFromInlineBuffer to extract the characters incrementally.
Fetches a range of the characters from a string into a byte buffer after converting the characters to a specified encoding.
Copies the character contents of a string to a local C string buffer after converting the characters to a given encoding.
Quickly obtains a pointer to a C-string buffer containing the characters of a string in a given encoding.
Returns the number (in terms of UTF-16 code pairs) of Unicode characters in a string.
Copies the character contents of a CFString object to a local Pascal string buffer after converting the characters to a requested encoding.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software