Converts a decimal number to hexadecimal representation (base 16).
const hex1 = Chalkboard.numb.toHexadecimal(26); // Returns "1a"const hex2 = Chalkboard.numb.toHexadecimal(26, true, true); // Returns "0x1A" Copy
const hex1 = Chalkboard.numb.toHexadecimal(26); // Returns "1a"const hex2 = Chalkboard.numb.toHexadecimal(26, true, true); // Returns "0x1A"
The decimal number
Optional
Whether to include "0x" prefix (optional, defaults to false)
Whether to use uppercase letters (optional, defaults to false)
Converts a decimal number to hexadecimal representation (base 16).
Example