Gets a given range of characters as bytes in a specified encoding.
- iOS 2.0+
- macOS 10.5+
- tvOS 9.0+
- watchOS 2.0+
A buffer into which to store the bytes from the receiver. The returned bytes are not
The maximum number of bytes to write to
The number of bytes used from
NULLif you do not need this value.
The encoding to use for the returned bytes. For possible values, see
A mask to specify options to use for converting the receiver’s contents to
encoding(if conversion is necessary).
The range of characters in the receiver to get.
The remaining range. Pass
NULLIf you do not need this value.
true if some characters were converted, otherwise
Conversion might stop when the buffer fills, but it might also stop when the conversion isn't possible due to the chosen encoding.