Initializer

init(utf8String:​)

Returns an NSString object initialized by copying the characters from a given C array of UTF8-encoded bytes.

Declaration

convenience init?(utf8String nullTerminatedCString: UnsafePointer<Int8>)

Parameters

null​Terminated​CString

A NULL-terminated C array of bytes in UTF-8 encoding. This value must not be NULL.

Return Value

An NSString object initialized by copying the bytes from null​Terminated​CString. The returned object may be different from the original receiver.

See Also

Related Symbols

string​With​UTF8String:​

Returns a string created by copying the data from a given C array of UTF8-encoded bytes.