CFStringCreateFromExternalRepresentation |
||||
Header: | CFString.h | Carbon status: | Supported | |
Creates a CFString object from its "external representation."
CFStringRef CFStringCreateFromExternalRepresentation ( CFAllocatorRef alloc, CFDataRef data, CFStringEncoding encoding );
Pass a reference to an allocator object or pass NULL to request the default allocator.
Pass a reference to CFData object containing bytes that hold the characters in the specified encoding.
Encoding to use when interpreting the bytes in the data argument.
A reference to an immutable CFString object or NULL if there was a problem creating the object.
The CFStringCreateFromExternalRepresentation function creates a CFString object from its "external representation." In this form (that is, as a CFData object), the character data can be written to disk as a file or be sent out over a network. If the encoding of the characters in the data object is Unicode, the function reads any BOM (byte order marker) and properly resolves endianness.
The CFStringCreateExternalRepresentation function complements this function by creating an "external representation" CFData object from a CFString object.
Supported in Carbon. Available in Carbon 1.0.2 and later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)