init(location:end:)
Creates a new text range with the starting and ending locations you specify.
Declaration
init?(location: any NSTextLocation, end endLocation: (any NSTextLocation)?)Parameters
- location:
The starting location.
- endLocation:
The ending location, or
nilfor an empty range.
Discussion
Returns an empty range when endLocation is nil.