NSTextRange
A class that represents a contiguous range between two locations inside document contents.
Declaration
class NSTextRangeOverview
An NSTextRange consists of the starting and terminating locations. There the two basic properties: location and endLocation, respectively. The terminating location, endLocation, is directly following the last location in the range. For example, a location contains a range if (range.location <= location) && (location < range.endLocation) is true.