inputBaseN

Converts string, using the base specified by radix, to an integer.

inputBaseN(String, radix) → returns numeric

Argument Reference

String string
Required

radix string
Required

Examples
Sample code invoking the inputBaseN function

inputBaseN("1010",2)

Expected Result: 10

inputBaseN("3FF",16)

Expected Result: 1023

inputBaseN("125",10)

Expected Result: 125

inputBaseN(1010,2)

Expected Result: 10

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

Fork me on GitHub