toUInt128

inline fun UByte.toUInt128(): UInt128(source)

Converts this UByte value to UInt128.

The resulting UInt128 value represents the same numerical value as this UByte.

The least significant 8 bits of the resulting UInt128 value are the same as the bits of this UByte value, whereas the most significant 120 bits are filled with zeros.


Converts this UShort value to UInt128.

The resulting UInt128 value represents the same numerical value as this UShort.

The least significant 16 bits of the resulting UInt128 value are the same as the bits of this UShort value, whereas the most significant 112 bits are filled with zeros.


inline fun UInt.toUInt128(): UInt128(source)

Converts this UInt value to UInt128.

The resulting UInt128 value represents the same numerical value as this UInt.

The least significant 32 bits of the resulting UInt128 value are the same as the bits of this UInt value, whereas the most significant 96 bits are filled with zeros.


inline fun ULong.toUInt128(): UInt128(source)

Converts this ULong value to UInt128.

The resulting UInt128 value represents the same numerical value as this ULong.

The least significant 64 bits of the resulting UInt128 value are the same as the bits of this ULong value, whereas the most significant 64 bits are filled with zeros.


inline fun Byte.toUInt128(): UInt128(source)

Converts this Byte value to UInt128.

If this value is positive, the resulting UInt128 value represents the same numerical value as this Byte.

The least significant 8 bits of the resulting UInt128 value are the same as the bits of this Byte value, whereas the most significant 120 bits are filled with the sign bit of this value.


inline fun Short.toUInt128(): UInt128(source)

Converts this Short value to UInt128.

If this value is positive, the resulting UInt128 value represents the same numerical value as this Short.

The least significant 16 bits of the resulting UInt128 value are the same as the bits of this Short value, whereas the most significant 112 bits are filled with the sign bit of this value.


inline fun Int.toUInt128(): UInt128(source)

Converts this Int value to UInt128.

If this value is positive, the resulting UInt128 value represents the same numerical value as this Int.

The least significant 32 bits of the resulting UInt128 value are the same as the bits of this Int value, whereas the most significant 96 bits are filled with the sign bit of this value.


inline fun Long.toUInt128(): UInt128(source)

Converts this Long value to UInt128.

If this value is positive, the resulting UInt128 value represents the same numerical value as this Long.

The least significant 64 bits of the resulting UInt128 value are the same as the bits of this Long value, whereas the most significant 64 bits are filled with the sign bit of this value.


Parses the string as a UInt128 number and returns the result.

Throws

if the string is not a valid representation of a number.


Parses the string as a UInt128 number and returns the result.

Throws

if the string is not a valid representation of a number.

when radix is not a valid radix for string to number conversion.