The OpenD Programming Language

toHex

pure @safe
string
toHex
(
const(BigInt) x
)

Parameters

x const(BigInt)

The BigInt to convert to a hexadecimal string.

Return Value

Type: string

A string that represents the BigInt as a hexadecimal (base 16) number in upper case.

Examples

auto x = BigInt("123");
x *= 1000;
x += 456;

auto xstr = x.toHex();
assert(xstr == "1E240");

Meta