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

nullTerminatedCString

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 nullTerminatedCString. The returned object may be different from the original receiver.

See Also

Related Symbols

stringWithUTF8String:

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