compareTo

operator fun Number.compareTo(other: Int): Int

It compares this number with the specified integer.

Return

Returns zero if this number is equal to the other integer, a negative integer if it's less than other, or a positive integer if it's greater than other.

Sources

Link copied to clipboard