Extracts the contents of a string as a
NULL-terminated 8-bit string appropriate for passing to POSIX APIs.
- iOS 2.0+
- macOS 10.4+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The string to convert.
The C string buffer into which to copy the string. The buffer must be at least
maxbytes in length. On return, the buffer contains the converted characters.
The maximum length of the buffer.
true if the string is correctly converted;
false if the conversion fails, or the results don’t fit into the buffer.
You can use
CFString if you want to make sure the buffer is of sufficient length.