Atom

binary.hex()

Encodes bytes as lowercase hexadecimal.

Signature

binary.hex(data)

Parameters

Packed span or text, with text interpreted as its UTF-8 bytes.

Returns

String.

Behavior

Emits two digits per byte.

Errors

Unsupported input or output size overflow.

Example

Atom
use binary
assert(binary.hex('A') == '41')