kotlin / 1.8 / api / latest / jvm / stdlib / kotlin / -int / range-until.html

rangeUntil

Platform and version requirements: JVM (1.7), JS (1.7), Native (1.7)
@ExperimentalStdlibApi operator fun rangeUntil(
    other: Byte
): IntRange
@ExperimentalStdlibApi operator fun rangeUntil(
    other: Short
): IntRange
@ExperimentalStdlibApi operator fun rangeUntil(
    other: Int
): IntRange
@ExperimentalStdlibApi operator fun rangeUntil(
    other: Long
): LongRange

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

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

© 2010–2023 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/range-until.html