Bytes.padRight
Pads a Bytes.Bytes
value to the right with zero bytes until it reaches the given size
(default: 32 bytes).
Imports
Named
import { Bytes } from 'ox'
Examples
import { Bytes } from 'ox'
Bytes.padRight(Bytes.from([1]), 4)
Uint8Array([1, 0, 0, 0])
Definition
function padRight(
value: Bytes,
size?: number | undefined,
): padRight.ReturnType
Source: src/Bytes.ts
Parameters
value
- Type:
Bytes
Bytes.Bytes
value to pad.
size
- Type:
number | undefined
- Optional
Size to pad the Bytes.Bytes
value to.
Return Type
Padded Bytes.Bytes
value.
padRight.ReturnType