init(decodingCString:as:)
Creates a string from the null-terminated sequence of bytes at the given pointer.
Declaration
init<Encoding>(decodingCString nullTerminatedCodeUnits: UnsafePointer<Encoding.CodeUnit>, as sourceEncoding: Encoding.Type) where Encoding : _UnicodeEncodingParameters
- nullTerminatedCodeUnits:
A pointer to a sequence of contiguous code units in the encoding specified in
sourceEncoding, ending just before the first zero code unit. - sourceEncoding:
The encoding in which the code units should be interpreted.