Contents

string(withCString:)

Creates a new string using a given C-string.

Declaration

class func string(withCString bytes: UnsafePointer<CChar>) -> 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

Deprecated