Returns a Boolean value indicating whether this range and the given range contain an element in common.
- Xcode 8.0+
- Swift Standard Library
A range to check for elements in common.
true if this range and
other have at least one element in common; otherwise,
This example shows two overlapping ranges:
Because a closed range includes its upper bound, the ranges in the following example also overlap: