All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.utility.Misc.kt Maven / Gradle / Ivy

package io.fluidsonic.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" }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy