rangeTo

operator fun rangeTo(other: Byte): IntRange(source)
operator fun rangeTo(other: Short): IntRange(source)
operator fun rangeTo(other: Int): IntRange(source)
operator fun rangeTo(other: Long): LongRange(source)

Creates a range from this value to the specified other value.

Since Kotlin

1.0
operator fun rangeTo(other: Byte): IntRange(source)
operator fun rangeTo(other: Short): IntRange(source)
operator fun rangeTo(other: Int): IntRange(source)
operator fun rangeTo(other: Long): LongRange(source)

Creates a range from this value to the specified other value.

Since Kotlin

1.1
operator fun rangeTo(other: Byte): IntRange(source)
operator fun rangeTo(other: Short): IntRange(source)
operator fun rangeTo(other: Int): IntRange(source)
operator fun rangeTo(other: Long): LongRange(source)

Creates a range from this value to the specified other value.

Since Kotlin

1.3
operator fun rangeTo(other: Byte): IntRange(source)
operator fun rangeTo(other: Short): IntRange(source)
operator fun rangeTo(other: Int): IntRange(source)
operator fun rangeTo(other: Long): LongRange(source)

Creates a range from this value to the specified other value.

Since Kotlin

1.8
operator fun rangeTo(other: Byte): IntRange(source)
operator fun rangeTo(other: Short): IntRange(source)
operator fun rangeTo(other: Int): IntRange(source)
operator fun rangeTo(other: Long): LongRange(source)

Creates a range from this value to the specified other value.

Since Kotlin

1.8