![]() |
CFStringSetExternalCharactersNoCopy | Header: CFString.h |
Notifies a mutable CFString object that its external backing store of Unicode characters has changed.
void CFStringSetExternalCharactersNoCopy ( CFMutableStringRef theString, UniChar *chars, CFIndex length, CFIndex capacity );
Pass a reference to a mutable CFString object acting as a "wrapper" for the external backing store. The function raises an assertion if the CFString object is not mutable.
Pass a pointer to the external (client-owned) Unicode buffer acting as backing store.
Pass an integer specifying the length of the new buffer (in Unicode characters).
Pass an integer specifying the capacity of the Unicode buffer; that is, the total number of Unicode characters that can be stored in it before the buffer has to be grown.
The CFStringSetExternalCharactersNoCopy informs a mutable CFString object using an external buffer as its backing store that the contents or the address of the buffer have changed. It does this so the object can rellocate memory, if necessary, and change its references to the data in the buffer. The object must have been created with the CFStringCreateMutableWithExternalCharactersNoCopy function; see the discussion of this function for more information.