Library API
    Preparing search index...

    Function toHex

    • Converts a number or array of numbers into a contiguous hexadecimal string. Flattens nested arrays and filters out non-integers.

      Parameters

      • num: TValues<number> = []

        The number(s) to convert

      • Optionallen: number

        Optional maximum length of the resulting string

      Returns string

      The hexadecimal string representation

      toHex([255, 16]); // 'ff10'