Copies characters from a given range in the receiver into a given buffer.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
Upon return, contains the characters from the receiver.
buffermust be large enough to contain the characters in the range
The range of characters to retrieve. The range must not exceed the bounds of the receiver.
This method does not add a
The abstract implementation of this method uses
character repeatedly, correctly extracting the characters, though very inefficiently. Subclasses should override it to provide a fast implementation.
You should always use the
range method to determine character boundaries, so that any surrogate pairs or character clusters are handled correctly.