Creates a new string by copying and validating the null-terminated UTF-8 data referenced by the given pointer.
- Xcode 8.0+
- Swift Standard Library
A pointer to a null-terminated UTF-8 code sequence.
This initializer does not try to repair ill-formed UTF-8 code unit sequences. If any are found, the result of the initializer is
The following example calls this initializer with pointers to the contents of two different
CChar arrays—the first with well-formed UTF-8 code unit sequences and the second with an ill-formed sequence at the end.