compareTo

open fun compareTo(@NonNull other: Range): Int

Compares this range to another range for ordering. Ranges are first compared by their start position, then by length if positions are equal.

Return

A negative integer if this range comes before the other, a positive integer if it comes after, or zero if they are equal.

Parameters

other

The range to compare against.