NSString object initialized using the characters in a given C array, interpreted according to a given encoding.
- iOS 2.0+
- macOS 10.4+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
A C array of characters. The array must end with a
NULLcharacters are not allowed.
The encoding of
null. For possible values, see
NSString object initialized using the characters from
null. The returned object may be different from the original receiver
null is not a
NULL-terminated C string, or
encoding does not match the actual character encoding, the results are undefined.
Only 8-bit encodings are supported, as encodings that have a greater width, such as UTF-16, may include a
NULL byte in a single unit, which would result in the premature termination of the C string.