string(withCString:length:)
Returns a string containing the characters in a given C-string.
Declaration
class func string(withCString bytes: UnsafePointer<CChar>, length: Int) -> Any?Discussion
cString must not be NULL. cString should contain characters in the default C-string encoding. This method converts length * sizeof(char) bytes from cString and doesn’t stop short at a NULL character.
See Also
Deprecated
string(withCString:)init(CString:)init(CString:length:)init(CStringNoCopy:length:freeWhenDone:)string(withContentsOfFile:)init(contentsOfFile:)string(withContentsOf:)init(contentsOfURL:)write(toFile:atomically:)write(to:atomically:)getCharacters(_:)cString()lossyCString()cStringLength()getCString(_:)