rangeTo

Creates a Boolean range from this value up to other, inclusive.

Ordering is false < true. false..true contains both values. The range supports membership tests and empty checks, without iteration.

Receiver

the inclusive lower bound.

Return

a Boolean range; empty when the lower bound exceeds other.

Parameters

other

the inclusive upper bound.


Creates a floating-point range from this value up to other, inclusive.

Membership uses IEEE comparisons. NaN is never contained; a NaN bound makes the range empty. Signed zeros compare as equal. The range does not support iteration.

Receiver

the inclusive lower bound.

Return

a range of Float values; empty when the lower bound exceeds other, or either bound is NaN.

Parameters

other

the inclusive upper bound.


Creates a floating-point range from this value up to other, inclusive.

Membership uses IEEE comparisons. NaN is never contained; a NaN bound makes the range empty. Signed zeros compare as equal. The range does not support iteration.

Receiver

the inclusive lower bound.

Return

a range of Double values; empty when the lower bound exceeds other, or either bound is NaN.

Parameters

other

the inclusive upper bound.


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

Creates an ascending range from this value up to other, inclusive.

The bounds are widened to Int without changing their values.

Receiver

the inclusive starting value.

Return

a range with step one, empty when the start exceeds other.

Parameters

other

the inclusive upper bound.


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

Creates an ascending range from this value up to other, inclusive.

The bounds are widened to Long without changing their values.

Receiver

the inclusive starting value.

Return

a range with step one, empty when the start exceeds other.

Parameters

other

the inclusive upper bound.


operator fun UByte.rangeTo(other: UByte): UIntRange(source)
operator fun UByte.rangeTo(other: UShort): UIntRange(source)
operator fun UByte.rangeTo(other: UInt): UIntRange(source)
operator fun UShort.rangeTo(other: UByte): UIntRange(source)
operator fun UShort.rangeTo(other: UShort): UIntRange(source)
operator fun UShort.rangeTo(other: UInt): UIntRange(source)
operator fun UInt.rangeTo(other: UByte): UIntRange(source)
operator fun UInt.rangeTo(other: UShort): UIntRange(source)
operator fun UInt.rangeTo(other: UInt): UIntRange(source)

Creates an ascending range from this value up to other, inclusive.

The bounds are widened to UInt without changing their values.

Receiver

the inclusive starting value.

Return

a range with step one, empty when the start exceeds other.

Parameters

other

the inclusive upper bound.


operator fun UByte.rangeTo(other: ULong): ULongRange(source)
operator fun UShort.rangeTo(other: ULong): ULongRange(source)
operator fun UInt.rangeTo(other: ULong): ULongRange(source)
operator fun ULong.rangeTo(other: UByte): ULongRange(source)
operator fun ULong.rangeTo(other: UShort): ULongRange(source)
operator fun ULong.rangeTo(other: UInt): ULongRange(source)
operator fun ULong.rangeTo(other: ULong): ULongRange(source)

Creates an ascending range from this value up to other, inclusive.

The bounds are widened to ULong without changing their values.

Receiver

the inclusive starting value.

Return

a range with step one, empty when the start exceeds other.

Parameters

other

the inclusive upper bound.


operator fun Char.rangeTo(other: Char): CharRange(source)

Creates an ascending range from this value up to other, inclusive.

Receiver

the inclusive starting value.

Return

a range with step one, empty when the start exceeds other.

Parameters

other

the inclusive upper bound.