W3cubDocs

/Kotlin

downTo

infix fun Int.downTo(to: Byte): IntProgression
infix fun Long.downTo(to: Byte): LongProgression
infix fun Byte.downTo(to: Byte): IntProgression
infix fun Short.downTo(to: Byte): IntProgression
infix fun Char.downTo(to: Char): CharProgression
infix fun Int.downTo(to: Int): IntProgression
infix fun Long.downTo(to: Int): LongProgression
infix fun Byte.downTo(to: Int): IntProgression
infix fun Short.downTo(to: Int): IntProgression
infix fun Int.downTo(to: Long): LongProgression
infix fun Long.downTo(to: Long): LongProgression
infix fun Byte.downTo(to: Long): LongProgression
infix fun Short.downTo(to: Long): LongProgression
infix fun Int.downTo(to: Short): IntProgression
infix fun Long.downTo(to: Short): LongProgression
infix fun Byte.downTo(to: Short): IntProgression
infix fun Short.downTo(to: Short): IntProgression

Returns a progression from this value down to the specified to value with the step -1.

The to value has to be less than this value.

© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.ranges/down-to.html