struct

UInt128

Inherits Int < Comparable < Comparable < Comparable < Number < Comparable < Steppable < Comparable < Value < Object

monkey patch UInt128 to introduce a new class method onto UInt128

Constructors

from_bytes(bytes : Bytes | StaticArray(UInt8, 16)) : UInt128

converts a slice of bytes in which bytes[0] is the low-order byte of the u128 and bytes[15] is the high order byte of the u128 back into the corresponding u128 Assumes bytes in little endian format.

Source
rand(random : Random = Random) : UInt128
Source

Class methods

bytes(u128_p : Pointer(UInt128)) : Slice(UInt8)

converts the u128 into a slice of bytes in which bytes[0] is the low-order byte of the u128 and bytes[15] is the high order byte of the u128 Returns a Slice(UInt8) in little endian format.

Source