range

inline fun <T : Comparable<T>> range(from: T, to: T, fromInclusive: Boolean = true, toInclusive: Boolean = true): T

Matches if the value is in range via the compareTo function.