Bit operationsReference
bit.tohex
Format a number as eight lowercase hexadecimal digits.
Details#
Format a number as eight lowercase hexadecimal digits. Eight-character string, without a 0x prefix. There is no width argument.
Signature#
bit.tohex(value: number): stringParameters#
| Parameter | Type | Description |
|---|---|---|
value | number | Number normalized to 32 bits. |
Returns#
Eight-character string, without a 0x prefix. There is no width argument.
Examples#
Local example
print(bit.tohex(255)) -- 000000ff