https://kotlinlang.org logo
#getting-started
Title
# getting-started
i

Irving Rivas

10/23/2020, 2:47 PM
@Alec Muffett bitwise are only available for Int and Long
a

Alec Muffett

10/23/2020, 2:48 PM
That's what I thought, but the documentation says:
Copy code
infix fun Byte.and(other: Byte): Byte
infix fun Short.and(other: Short): Short
Performs a bitwise AND operation between the two values.
r

Ruckus

10/23/2020, 2:49 PM
Note those are in the experimental package
a

Alec Muffett

10/23/2020, 2:49 PM
AAAAAAAAAh - thank you!
u

Umar Ata

10/23/2020, 7:24 PM
You may try functions like rhl to shift right And shl to shift left