Function hexpad

  • zero padding for hexadecimal string

    Parameters

    • s: string

      odd or even length hexadecimal string

    Returns string

    even length zero padded hexadecimal string

    Example

    hexpad("1") -> "01"
    hexpad("ab3c") -> "ab3c"