parseNumber

Converts string to number in numeral system

parseNumber(number [, radix]) → returns numeric

This function requires Lucee. Not supported on Adobe ColdFusion.

parseNumber Argument Reference

number string
Required

radix string

Values:
  • bin
  • oct
  • dec
  • hex

Examples sample code invoking the parseNumber function


Convert decimal number to binary

parseNumber(1010,"bin")

Expected Result: 10


Convert decimal number to hex

parseNumber(1010,"hex")

Expected Result: 4112


Fork me on GitHub