Type Method

string(withCString:)

Creates a new string using a given C-string.

Declaration

class func string(withCString bytes: UnsafePointer<Int8>) -> Any?

Discussion

cString should contain data in the default C string encoding. If the argument passed to string(withCString:) is not a zero-terminated C-string, the results are undefined.

See Also

Related Symbols

stringWithCString:encoding:

Returns a string containing the bytes in a given C array, interpreted according to a given encoding.