Chalkboard - v3.0.1
    Preparing search index...

    Function toHexadecimal

    • Converts a decimal number to hexadecimal representation (base 16).

      Parameters

      • num: number

        The decimal number

      • Optionalprefix: boolean = false

        Whether to include "0x" prefix (optional, defaults to false)

      • Optionaluppercase: boolean = false

        Whether to use uppercase letters (optional, defaults to false)

      Returns string

      const hex1 = Chalkboard.numb.toHexadecimal(26); // Returns "1a"
      const hex2 = Chalkboard.numb.toHexadecimal(26, true, true); // Returns "0x1A"