Whatever message this page gives is out now! Go check it out!

LSIsNumeric

Last update:
May 18, 2026

Description

Determines whether a string is a valid representation of a number in the current locale.

Returns

True, if the string represents a number the current locale; False, otherwise.

Category

Syntax

LSIsNumeric(string [, locale])

See also

GetLocaleSetLocaleHandling data in ColdFusion in the Developing ColdFusion Applications

History

ColdFusion 8: Added the locale parameter.
ColdFusion MX: Changed formatting behavior: this function might return a different result than in earlier releases. This function uses Java standard locale formatting rules on all platforms.

Parameters

Parameter
Description
string
A string or a variable that contains one
locale
Locale to use instead of the locale of the page when processing the function

Usage

To set the default display format of date, time, number, and currency values, use the SetLocale function.

Example

<cfscript>
    num="123-456"
    locale=getLocale()
    writeOutput("Locale is: " & locale & "<br/>")
    writeOutput(LSISNumeric(num,locale))
</cfscript>
Output
Locale is: English (US)

NO

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page