Any reason that UByte can do bitwise AND, OR, XOR,...
# announcements
t
Any reason that UByte can do bitwise AND, OR, XOR, but not SHIFT operations?
s
@crummy this is an unofficial library written before unsigned numeric types were brought into the stdlib in an experimental capacity in 2018.
c
ah.
s
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/ none of the shift operations are implemented as of yet on
UByte
cc @elect
e
thanks @Shawn
t
Copy code
infix fun UByte.shl(shift:Int):UByte {
   return (this.toUInt() shl shift).toUByte()
}