Like the IsNumeric
function, LSIsNumeric
returns TRUE if string can be converted to a number in the current locale; otherwise, FALSE.
LSIsNumeric(string)
Parameter |
Description |
---|---|
string |
Any string value |
<!--- This example shows LSIsNumeric ---> <html> <head> <title>LSIsNumeric Example</title> </head> <body bgcolor = silver> <H3>LSIsNumeric Example</H3> <cfif IsDefined("FORM.locale")> <!--- if locale is defined, set locale to that entry ---> <cfset NewLocale = SetLocale(FORM.locale)> <P>Is the value "<cfoutput>#FORM.myValue#</cFOUTPUT>" a proper numeric value for <cfoutput>#GetLocale()#</cfoutput>? <P>Answer: <cfoutput>#LSIsNumeric(FORM.myValue)#</cfoutput> </cfif> <P> <form action = "LSIsNumeric.cfm" method = "POST"> <P>Select a locale for which you would like to check a numeric value: ...