Returns the intersection of the specified ranges.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
A range describing the intersection of
range2—that is, a range containing the indices that exist in both ranges.
If the returned range’s length field is 0, then the two ranges don’t intersect, and the value of the location field is undefined.