core-ktx / androidx.util / android.util.Range / and

and

inline infix fun <T : Comparable<T>> Range<T>.and(other: Range<T>): Range<T>

Return the intersection of this range and other.

Exceptions

IllegalArgumentException - if this is disjoint from other.