Contents

sentenceRange(for:)

Returns the range of a sentence containing the specified range.

Declaration

func sentenceRange(for range: NSRange) -> NSRange

Parameters

  • 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.

See Also

Determining the Range of a Unit Token