commonMain.utility.Misc.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluid-stdlib-macosx64 Show documentation
Show all versions of fluid-stdlib-macosx64 Show documentation
Potentially useful Kotlin standard library additions
The newest version!
package com.github.fluidsonic.fluid.stdlib
@Suppress("NOTHING_TO_INLINE")
inline fun check(value: Int, inRange: IntRange, name: String) =
check(value in inRange) { "$name must be in range $inRange: $value" }
@Suppress("NOTHING_TO_INLINE")
inline fun check(value: Int, inRange: LongRange, name: String) =
check(value in inRange) { "$name must be in range $inRange: $value" }
@Suppress("NOTHING_TO_INLINE")
inline fun check(value: Long, inRange: IntRange, name: String) =
check(value in inRange) { "$name must be in range $inRange: $value" }
@Suppress("NOTHING_TO_INLINE")
inline fun check(value: Long, inRange: LongRange, name: String) =
check(value in inRange) { "$name must be in range $inRange: $value" }
@Suppress("NOTHING_TO_INLINE")
inline fun > check(value: Value, inRange: ClosedRange, name: String) =
check(value in inRange) { "$name must be in range $inRange: $value" }