init(cString:)
Creates a new string by copying the null-terminated UTF-8 data referenced by the given array.
Declaration
init(cString nullTerminatedUTF8: [CChar])Parameters
- nullTerminatedUTF8:
An array containing a null-terminated sequence of UTF-8 code units.
Discussion
If cString contains ill-formed UTF-8 code unit sequences, this initializer replaces them with the Unicode replacement character ("\u{FFFD}").