CFStringGetCharacters |
||||
Header: | CFString.h | Carbon status: | Supported | |
Copies a range of the Unicode characters represented by a CFString object to a a user-provided buffer.
void CFStringGetCharacters ( CFStringRef theString, CFRange range, UniChar *buffer );
Pass a reference to the CFString object from which the characters are to be obtained.
Pass a structure of type CFRange that indicates the range of characters to copy.
Pass a pointer to a UniChar buffer of length range.length that you have allocated on the stack or heap. On return, the buffer contains the requested Unicode characters.
You use the CFStringGetCharacters 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 CFStringInitInlineBuffer and CFStringGetCharacterFromInlineBuffer to extract the characters incrementally.
Supported in Carbon. Available in Carbon 1.0.2 and later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)