Name
IsNumeric
Synopsis
IsNumeric(string
)
Returns true
if the specified string can be
converted to a number or false
if it
can’t. Examples:
<cfoutput> -1: #IsNumeric(-1)#<br> 0: #IsNumeric(0)#<br> 1234: #IsNumeric(1234)#<br> 1,234,567,890: #IsNumeric('1,234,567,890')#<br> $1234.99: #IsNumeric('$1234.99')#<br> 04/15/2003: #IsNumeric('04/15/2003')#<br> 7pm: #IsNumeric('7pm')#<br> abcdef: #IsNumeric('abcdef')#<br> true: #IsNumeric(true)#<br> false: #IsNumeric(false)#<br> yes: #IsNumeric('yes')#<br> no: #IsNumeric('no')#<br> as45sd-1: #IsNumeric('as45sd')#<br> !@$%^: #IsNumeric('!@$%^')#<br> 1234abcd: #IsNumeric('1234abcd')# </cfoutput>
Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.