Skip to content
Try Kata

native.Usz

Native methods on Usz.

All modules · Writing docstrings

func to_int(self: Usz): Int

Convert to an arbitrary-precision Int without losing value.

func hash(self: Usz): U64

Return the runtime hash. Hash values are not a stable serialization format.

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

Apply bitwise & to two values of the same fixed-width integer type.

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

Apply bitwise | to two values of the same fixed-width integer type.

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

Apply bitwise ^ to two values of the same fixed-width integer type.

func inv(self: Usz): Usz

Invert every bit, retaining the same fixed-width integer type.

func shl(self: Usz, count: Int): Usz

Shift by a nonnegative count representable as U32. The count wraps modulo the integer width; signed right shifts extend the sign bit.

func shr(self: Usz, count: Int): Usz

Shift by a nonnegative count representable as U32. The count wraps modulo the integer width; signed right shifts extend the sign bit.