rotateLeft

fun Byte.rotateLeft(bitCount: Int): Byte(source)

Rotates the binary representation of this Byte 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Byte.SIZE_BITS (8) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 8)`

Since Kotlin

1.6

fun Short.rotateLeft(bitCount: Int): Short(source)

Rotates the binary representation of this Short 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Short.SIZE_BITS (16) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 16)`

Since Kotlin

1.6

inline fun UInt.rotateLeft(bitCount: Int): UInt(source)

Rotates the binary representation of this UInt 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of UInt.SIZE_BITS (32) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 32)`

Since Kotlin

1.6

inline fun ULong.rotateLeft(bitCount: Int): ULong(source)

Rotates the binary representation of this ULong 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of ULong.SIZE_BITS (64) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 64)`

Since Kotlin

1.6

inline fun UByte.rotateLeft(bitCount: Int): UByte(source)

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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of UByte.SIZE_BITS (8) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 8)`

Since Kotlin

1.6

inline fun UShort.rotateLeft(bitCount: Int): UShort(source)

Rotates the binary representation of this UShort 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of UShort.SIZE_BITS (16) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 16)`

Since Kotlin

1.6

expect fun Int.rotateLeft(bitCount: Int): Int(source)

Rotates the binary representation of this Int 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 32)`

Since Kotlin

1.6

expect fun Long.rotateLeft(bitCount: Int): Long(source)

Rotates the binary representation of this Long 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 64)`

Since Kotlin

1.6
actual fun Int.rotateLeft(bitCount: Int): Int(source)

Rotates the binary representation of this Int 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 32)`

Since Kotlin

1.6

actual fun Long.rotateLeft(bitCount: Int): Long(source)

Rotates the binary representation of this Long 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 64)`

Since Kotlin

1.6
actual inline fun Int.rotateLeft(bitCount: Int): Int(source)

Rotates the binary representation of this Int 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 32)`

Since Kotlin

1.6

actual inline fun Long.rotateLeft(bitCount: Int): Long(source)

Rotates the binary representation of this Long 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 64)`

Since Kotlin

1.6
actual fun Int.rotateLeft(bitCount: Int): Int(source)

Rotates the binary representation of this Int 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 32)`

Since Kotlin

1.6

actual fun Long.rotateLeft(bitCount: Int): Long(source)

Rotates the binary representation of this Long 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 64)`

Since Kotlin

1.6
actual fun Int.rotateLeft(bitCount: Int): Int(source)

Rotates the binary representation of this Int 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 32)`

Since Kotlin

1.8

actual fun Long.rotateLeft(bitCount: Int): Long(source)

Rotates the binary representation of this Long 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 64)`

Since Kotlin

1.8
actual fun Int.rotateLeft(bitCount: Int): Int(source)

Rotates the binary representation of this Int 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 32)`

Since Kotlin

1.8

actual fun Long.rotateLeft(bitCount: Int): Long(source)

Rotates the binary representation of this Long 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.

Rotating the number left by a negative bit count is the same as rotating it right by the negated bit count: `number.rotateLeft(-n) == number.rotateRight(n)`

Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally `number.rotateLeft(n) == number.rotateLeft(n % 64)`

1.8