Contents

intersection(_:)

Returns the range, if any, where two text ranges intersect.

Declaration

func intersection(_ textRange: NSTextRange) -> Self?

Parameters

  • textRange:

    The range used to compare against the current range to evaluate for differences.

Return Value

An NSRange that represents the intersection of the ranges, or nil if they don’t intersect.

See Also

Comparing text ranges