Commits

Andrew Trick committed c7aa8284c90
Add basic CString <-> UTF8 API variants. As proposed by SE-0107: UnsafeRawPointer: https://github.com/apple/swift-evolution/blob/master/proposals/0107-unsaferawpointer.md#cstring-conversion Adds String.init(cString: UnsafePointer<UInt8>) Adds String.nulTerminatedUTF8CString: ContiguousArray<CChar> This is necessary for eliminating UnsafePointer conversion. Such conversion is extremely common for interoperability between Swift strings and C strings to bridge the difference between CChar and UTF8.CodeUnit. The standard library does not provide any convenient utilities for converting between the differently typed buffers. These APIs will handle the simplest cases involving C interoperability. More convenience can be added later.