parseNumber

Converts string to number in numeral system

parseNumber(number [, radix]) → returns numeric

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

Argument Reference

number string
Required

radix string

Values:
  • bin
  • oct
  • dec
  • hex

Examples
Sample code invoking the parseNumber function

parseNumber(1010,"bin")

Expected Result: 10

parseNumber(1010,"hex")

Expected Result: 4112

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub