A contiguously stored null-terminated UTF-8 representation of the string.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
Discussion
To access the underlying memory, invoke with
on the array.
A contiguously stored null-terminated UTF-8 representation of the string.
SDK
Framework
To access the underlying memory, invoke with
on the array.
func with CString<Result>((Unsafe Pointer<Int8>) -> Result) -> Result
Calls the given closure with a pointer to the contents of the string, represented as a null-terminated sequence of UTF-8 code units.
func with CString<Result, Target Encoding>(encoded As: Target Encoding .Type, (Unsafe Pointer<Target Encoding .Code Unit>) -> Result) -> Result
Calls the given closure with a pointer to the contents of the string, represented as a null-terminated sequence of code units.