LSIsNumeric()

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

LSIsNumeric( number=string, locale=locale );

Returns: Boolean

Argument Description
number
string, required

A string or a variable that contains one

Alias: string

locale
locale, optional

Locale to use instead of the locale of the page when processing the function

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

See also