IsNumeric
Tests whether a value is numeric
Method Signature
IsNumeric(string=[any], locale=[string])
Arguments
Argument
Type
Required
Description
Default
string
any
true
locale
string
false
Optional locale string, otherwise the context locale default is used when parsing string values
Examples
Simple Lsisnumeric Example
Check whether the string is number or not in locale
lsIsNumeric( "Ten" );
Result: false
Simple Lsisnumeric Example
Check whether the string is number or not in locale
lsIsNumeric( "4678" );
Result: true
Additional Examples
writeoutput( lsIsNumeric( "123" ) & "<br>" );
writeoutput( lsIsNumeric( "five" ) & "<br>" );
writeoutput( lsIsNumeric( "3.21" ) & "<br>" );
writeoutput( lsIsNumeric( "0012" ) & "<br>" );
writeoutput( lsIsNumeric( "00.01" ) );
writeoutput( lsIsNumeric( "1.321,00" ) & "<br>" ); // false
writeoutput( lsIsNumeric( "1.321,00", "german" ) & "<br>" );
// true
Related
Last updated
Was this helpful?