UByte

Since Kotlin

1.5

Types

Link copied to clipboard
object Companion
Since Kotlin 1.5

Functions

Link copied to clipboard
infix inline fun and(other: UByte): UByte

Performs a bitwise AND operation between the two values.

Since Kotlin 1.5
Link copied to clipboard
fun UByte.coerceAtLeast(minimumValue: UByte): UByte

Ensures that this value is not less than the specified minimumValue.

Since Kotlin 1.5
Link copied to clipboard
fun UByte.coerceAtMost(maximumValue: UByte): UByte

Ensures that this value is not greater than the specified maximumValue.

Since Kotlin 1.5
Link copied to clipboard
fun UByte.coerceIn(minimumValue: UByte, maximumValue: UByte): UByte

Ensures that this value lies in the specified range minimumValue..maximumValue.

Since Kotlin 1.5
Link copied to clipboard
open inline operator override fun compareTo(other: UByte): Int
inline operator fun compareTo(other: UInt): Int
inline operator fun compareTo(other: ULong): Int
inline operator fun compareTo(other: UShort): Int

Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other.

Since Kotlin 1.5
Link copied to clipboard
infix inline fun <T> Comparable<T>.compareTo(other: T): Int

Compares this object with the specified object for order. Returns zero if this object is equal to the specified other object, a negative number if it's less than other, or a positive number if it's greater than other.

Since Kotlin 1.6
Link copied to clipboard
inline external fun <R : Any> UByte.convert(): R
Since Kotlin 1.3
Link copied to clipboard

Counts the number of consecutive most significant bits that are zero in the binary representation of this UByte number.

Since Kotlin 1.5
Link copied to clipboard
inline fun UByte.countOneBits(): Int

Counts the number of set bits in the binary representation of this UByte number.

Since Kotlin 1.5
Link copied to clipboard

Counts the number of consecutive least significant bits that are zero in the binary representation of this UByte number.

Since Kotlin 1.5
Link copied to clipboard
inline operator fun dec(): UByte

Returns this value decremented by one.

Since Kotlin 1.5
Link copied to clipboard
inline operator fun div(other: UByte): UInt
inline operator fun div(other: UInt): UInt
inline operator fun div(other: ULong): ULong
inline operator fun div(other: UShort): UInt

Divides this value by the other value, truncating the result to an integer that is closer to zero.

Since Kotlin 1.5
Link copied to clipboard

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

Since Kotlin 1.5
Link copied to clipboard
inline fun floorDiv(other: UByte): UInt
inline fun floorDiv(other: UInt): UInt
inline fun floorDiv(other: ULong): ULong
inline fun floorDiv(other: UShort): UInt

Divides this value by the other value, flooring the result to an integer that is closer to negative infinity.

Since Kotlin 1.5
Link copied to clipboard
inline operator fun inc(): UByte

Returns this value incremented by one.

Since Kotlin 1.5
Link copied to clipboard
inline fun inv(): UByte

Inverts the bits in this value.

Since Kotlin 1.5
Link copied to clipboard
inline operator fun minus(other: UByte): UInt
inline operator fun minus(other: UInt): UInt
inline operator fun minus(other: ULong): ULong
inline operator fun minus(other: UShort): UInt

Subtracts the other value from this value.

Since Kotlin 1.5
Link copied to clipboard
inline fun mod(other: UByte): UByte
inline fun mod(other: UInt): UInt
inline fun mod(other: ULong): ULong
inline fun mod(other: UShort): UShort

Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).

Since Kotlin 1.5
Link copied to clipboard
infix inline fun or(other: UByte): UByte

Performs a bitwise OR operation between the two values.

Since Kotlin 1.5
Link copied to clipboard
inline operator fun plus(other: UByte): UInt
inline operator fun plus(other: UInt): UInt
inline operator fun plus(other: ULong): ULong
inline operator fun plus(other: UShort): UInt

Adds the other value to this value.

Since Kotlin 1.5
Link copied to clipboard
inline operator fun rangeTo(other: UByte): UIntRange

Creates a range from this value to the specified other value.

Since Kotlin 1.5
Link copied to clipboard
inline operator fun rangeUntil(other: UByte): UIntRange

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

Since Kotlin 1.9
Link copied to clipboard
inline operator fun rem(other: UByte): UInt
inline operator fun rem(other: UInt): UInt
inline operator fun rem(other: ULong): ULong
inline operator fun rem(other: UShort): UInt

Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).

Since Kotlin 1.5
Link copied to clipboard
inline fun UByte.rotateLeft(bitCount: Int): UByte

Rotates the binary representation of this UByte number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side.

Since Kotlin 1.6
Link copied to clipboard
inline fun UByte.rotateRight(bitCount: Int): UByte

Rotates the binary representation of this UByte number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Since Kotlin 1.6
Link copied to clipboard

Returns a number having a single bit set in the position of the most significant set bit of this UByte number, or zero, if this number is zero.

Since Kotlin 1.5
Link copied to clipboard

Returns a number having a single bit set in the position of the least significant set bit of this UByte number, or zero, if this number is zero.

Since Kotlin 1.5
Link copied to clipboard
inline operator fun times(other: UByte): UInt
inline operator fun times(other: UInt): UInt
inline operator fun times(other: ULong): ULong
inline operator fun times(other: UShort): UInt

Multiplies this value by the other value.

Since Kotlin 1.5
Link copied to clipboard
inline fun toByte(): Byte

Converts this UByte value to Byte.

Since Kotlin 1.5
Link copied to clipboard
inline fun toDouble(): Double

Converts this UByte value to Double.

Since Kotlin 1.5
Link copied to clipboard
inline fun toFloat(): Float

Converts this UByte value to Float.

Since Kotlin 1.5
Link copied to clipboard
inline fun UByte.toHexString(format: HexFormat = HexFormat.Default): String

Formats this UByte value using the specified format.

Since Kotlin 1.9
Link copied to clipboard
inline fun toInt(): Int

Converts this UByte value to Int.

Since Kotlin 1.5
Link copied to clipboard
inline fun toLong(): Long

Converts this UByte value to Long.

Since Kotlin 1.5
Link copied to clipboard
inline fun toShort(): Short

Converts this UByte value to Short.

Since Kotlin 1.5
Link copied to clipboard
open override fun toString(): String
Since Kotlin 1.5
Link copied to clipboard
fun UByte.toString(radix: Int): String

Returns a string representation of this Byte value in the specified radix.

Since Kotlin 1.5
Link copied to clipboard
inline fun toUByte(): UByte

Returns this value.

Since Kotlin 1.5
Link copied to clipboard
inline fun toUInt(): UInt

Converts this UByte value to UInt.

Since Kotlin 1.5
Link copied to clipboard
inline fun toULong(): ULong

Converts this UByte value to ULong.

Since Kotlin 1.5
Link copied to clipboard
inline fun toUShort(): UShort

Converts this UByte value to UShort.

Since Kotlin 1.5
Link copied to clipboard
infix fun UByte.until(to: UByte): UIntRange

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

Since Kotlin 1.5
Link copied to clipboard
infix inline fun xor(other: UByte): UByte

Performs a bitwise XOR operation between the two values.

Since Kotlin 1.5