Converts a locale-specific string to a number. Returns the number matching the value of string.
LSParseNumber(string)
String being converted to a number.
<!--- This shows LSParseNumber ---> <HTML> <HEAD> <TITLE>LSParseNumber Example</TITLE> </HEAD> <BODY> <H3>LSParseNumber Example</H3> <P>LSParseNumber converts a locale-specific string to a number. Returns the number matching the value of string. <!--- loop through a list of possible locales and show number values ---> <CFLOOP LIST="#Server.Coldfusion.SupportedLocales#" INDEX="locale" DELIMITERS=","> <CFSET oldlocale = SetLocale(locale)> <CFOUTPUT><P><B><I>#locale#</I></B><BR> #LSNumberFormat(-1234.5678, "_________")#<BR> #LSNumberFormat(-1234.5678, "_________.___")#<BR> #LSNumberFormat(1234.5678, "_________")#<BR> #LSNumberFormat(1234.5678, "_________.___")#<BR> #LSNumberFormat(1234.5678, "$_(_________.___)")#<BR> #LSNumberFormat(-1234.5678, "$_(_________.___)")#<BR> #LSNumberFormat(1234.5678, "+_________.___")#<BR> #LSNumberFormat(1234.5678, "-_________.___")#<BR> The actual number: #LSParseNumber (LSNumberFormat(1234.5678, "_________"))#<BR> <Hr noshade> </CFOUTPUT> </CFLOOP> </BODY> </HTML>