lsParseNumber

Converts a string that is a valid numeric representation in the current locale into a formatted number.

lsParseNumber(String [, locale]) → returns numeric

Argument Reference

String string
Required

locale string

Locale to use instead of the locale of the page when processing the function

Examples
Sample code invoking the lsParseNumber function

Converts number to string and back"

str = numberFormat(42,'000.00');
num = lsParseNumber(str);
writeOutput(str&' → '&num);

Expected Result: 042.00 → 42

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

Fork me on GitHub