Hex.padLeft
Pads a Hex.Hex
value to the left with zero bytes until it reaches the given size
(default: 32 bytes).
Imports
Named
import { Hex } from 'ox'
Examples
import { Hex } from 'ox'
Hex.padLeft('0x1234', 4)
'0x00001234'
Definition
function padLeft(
value: Hex,
size?: number | undefined,
): padLeft.ReturnType
Source: src/core/Hex.ts
Parameters
value
- Type:
Hex
The Hex.Hex
value to pad.
size
- Type:
number | undefined
- Optional
The size (in bytes) of the output hex value.
Return Type
The padded Hex.Hex
value.
padLeft.ReturnType