isNumeric

Determines whether a string can be converted to a numeric value. Supports numbers in U.S. number format. For other number support use LSIsNumeric.

isNumeric(String) → returns boolean

Argument Reference

String string
Required

Examples
Sample code invoking the isNumeric function

isNumeric(23)

Expected Result: YES

isNumeric("twenty")

Expected Result: NO

The number 5e2 is scientific notation for 5 x 10^2 aka 500

isNumeric(5e2)

Expected Result: YES

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

Fork me on GitHub