Skip to content
Try Kata

native.Byte

Native methods on Byte.

All modules · Writing docstrings

func to_int(self: Byte): Int

Converts the byte value to Int.

func band(self: Byte, other: Byte): Byte

Returns the bitwise AND of two bytes.

func ior(self: Byte, other: Byte): Byte

Returns the bitwise inclusive OR of two bytes.

func xor(self: Byte, other: Byte): Byte

Returns the bitwise XOR of two bytes.

func inv(self: Byte): Byte

Returns the bitwise complement of a byte.

func shl(self: Byte, shift: Int): Byte

Shifts left with wrapping byte semantics; shift must convert to u32 or errors.

func shr(self: Byte, shift: Int): Byte

Shifts right with wrapping byte semantics; shift must convert to u32 or errors.

func hash(self: Byte): U64

Returns this byte’s runtime hash.