Skip to main content

setLengthRight

Callable

  • setLengthRight(msg: Buffer, length: number): Buffer

  • Right Pads a Buffer with trailing zeros till it has length bytes. it truncates the end if it exceeds.


    Parameters

    • msg: Buffer

      the value to pad (Buffer)

    • length: number

      the number of bytes the output should be

    Returns Buffer

    (Buffer)