init(cString:)
Creates a new string by copying the null-terminated UTF-8 data referenced by the given pointer.
Declaration
init(cString nullTerminatedUTF8: UnsafePointer<UInt8>)Parameters
- nullTerminatedUTF8:
A pointer to a null-terminated sequence of UTF-8 code units.
Discussion
This is identical to init(cString: UnsafePointer<CChar>) but operates on an unsigned sequence of bytes.