Creates a string from its “external representation.”
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The allocator to use to allocate memory for the new string. Pass
kto use the current default allocator.
The CFData object containing bytes that hold the characters in the specified encoding.
The encoding to use when interpreting the bytes in the data argument.
An immutable string containing the characters from
NULL if there was a problem creating the object. Ownership follows the The Create Rule.
In the CFData object form, the string 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.
CFString function complements this function by creating an “external representation” CFData object from a string.