until

Common
JVM
JS
Native
1.0
infix fun Int.until(to: Byte): IntRange
infix fun Long.until(to: Byte): LongRange
infix fun Byte.until(to: Byte): IntRange
infix fun Short.until(to: Byte): IntRange
infix fun Long.until(to: Int): LongRange
infix fun Int.until(to: Short): IntRange
infix fun Long.until(to: Short): LongRange
infix fun Byte.until(to: Short): IntRange
infix fun Short.until(to: Short): IntRange
infix fun UByte.until(to: UByte): UIntRange
infix fun UShort.until(to: UShort): UIntRange

Returns a range from this value up to but excluding the specified to value.

If the to value is less than or equal to this value the returned range is empty.

Common
JVM
JS
Native
1.0
infix fun Char.until(to: Char): CharRange

Returns a range from this value up to but excluding the specified to value.

If the to value is less than or equal to this value the returned range is empty.

If the to value is less than or equal to '\u0000' the returned range is empty.

Common
JVM
JS
Native
1.0
infix fun Int.until(to: Int): IntRange
infix fun Byte.until(to: Int): IntRange
infix fun Short.until(to: Int): IntRange

Returns a range from this value up to but excluding the specified to value.

If the to value is less than or equal to this value the returned range is empty.

If the to value is less than or equal to Int.MIN_VALUE the returned range is empty.

Common
JVM
JS
Native
1.0
infix fun Int.until(to: Long): LongRange
infix fun Long.until(to: Long): LongRange
infix fun Byte.until(to: Long): LongRange
infix fun Short.until(to: Long): LongRange

Returns a range from this value up to but excluding the specified to value.

If the to value is less than or equal to this value the returned range is empty.

If the to value is less than or equal to Long.MIN_VALUE the returned range is empty.

Common
JVM
JS
Native
1.3
infix fun UInt.until(to: UInt): UIntRange

Returns a range from this value up to but excluding the specified to value.

If the to value is less than or equal to this value the returned range is empty.

If the to value is less than or equal to UInt.MIN_VALUE the returned range is empty.

Common
JVM
JS
Native
1.3
infix fun ULong.until(to: ULong): ULongRange

Returns a range from this value up to but excluding the specified to value.

If the to value is less than or equal to this value the returned range is empty.

If the to value is less than or equal to ULong.MIN_VALUE the returned range is empty.