![]() |
CFStringGetCharacterAtIndex | Header: CFString.h |
Obtains the Unicode character at a specified location in a CFString object.
UniChar CFStringGetCharacterAtIndex ( CFStringRef theString, CFIndex idx );
Pass a reference to the CFString object from which the Unicode character is obtained.
Pass an integer indicating the position of the Unicode character in the CFString.
A Unicode character.
This function is typically called in a loop to fetch the Unicode characters of a CFString object in sequence or to fetch a character at a known position (first or last, for example). Using it in a loop can be slow, especially with longer strings, so consider the CFStringGetCharacters function or the in-line buffer functions (CFStringInitInlineBuffer and CFStringGetCharacterFromInlineBuffer) as alternatives.