Returns a string object containing the characters of the receiver that lie within a given range.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
A range. The range must not exceed the bounds of the receiver.
a- 1) or (
a- 1) lies beyond the end of the receiver.
A string object containing the characters of the receiver that lie within
This method detects all invalid ranges (including those with negative lengths). For applications linked against macOS 10.6 and later, this error causes an exception; for applications linked against earlier releases, this error causes a warning, which is displayed just once per application execution.