Creates a string from a buffer of Unicode characters.
- 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 buffer of Unicode characters to copy into the new string.
The number of characters in the buffer pointed to by
chars. Only this number of characters will be copied to internal storage.
An immutable string containing
NULL if there was a problem creating the object. Ownership follows the The Create Rule.
This function creates an immutable string from a client-supplied Unicode buffer. You must supply a count of the characters in the buffer. This function always copies the characters in the provided buffer into internal storage.
To save memory, this function might choose to store the characters internally in a 8-bit backing store. That is, just because a buffer of
Uni characters was used to initialize the object does not mean you will get back a non-
NULL result from