sentenceRange(for:)
Returns the range of a sentence containing the specified range.
Declaration
func sentenceRange(for range: NSRange) -> NSRangeParameters
- range:
The character range.
Return Value
Returns the range of the sentence.
Discussion
This is a convenience method for calling tokenRange(at:unit:), passing the NSLinguisticTaggerUnit.sentence unit and the first position of the provided range.