User Guide Cancel

IsNumeric

 

Description

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

Returns

True, if string can be converted to a number; False, otherwise.

Category

Syntax

IsNumeric(string)
IsNumeric(string)
IsNumeric(string)

See also

Parameters

Parameter

Description

string

A string or a variable that contains one.

Example

 

<cfscript>
string = "hello world";
result = IsNumeric(string);
output = IIF(result eq 1, DE(true),DE(false));
writeoutput(output);
</cfscript>
<cfscript> string = "hello world"; result = IsNumeric(string); output = IIF(result eq 1, DE(true),DE(false)); writeoutput(output); </cfscript>
<cfscript>
    string = "hello world";
    result = IsNumeric(string);
    output = IIF(result eq 1, DE(true),DE(false));
    writeoutput(output);
</cfscript>

Output

false

Get help faster and easier

New user?