Formats a locale-specific currency string as a number. Attempts conversion through each of the default currency formats (none, local, international).
A formatted number that matches the value of the string.
International functions, String functions
LSParseCurrency(string)
LSCurrencyFormat,
LSParseEuroCurrency
New in ColdFusion MX: This function might return different formatting than in earlier releases. This function uses Java standard locale formatting rules on all platforms.
Parameter | Description |
---|---|
string |
A locale-specific string a variable that contains one |
This function uses Java standard locale formatting rules on all platforms.
This function is similar to LSParseEuroCurrency
, but it parses a non-euro currency string for a locale.
The following table shows examples of currency output:
To set the default display format of date, time, number, and currency values, use the SetLocale function.
<h3>LSParseCurrency Example</h3> <p>LSParseCurrency coverts a locale-specific currency string to a number. Attempts conversion through each of the three default currency formats. <!--- loop through a list of locales; show currency values for 123,456 units ---> <cfloop LIST = "#Server.Coldfusion.SupportedLocales#" index = "locale" delimiters = ","> <cfset oldlocale = SetLocale(locale)> <cfoutput><p><B><I>#locale#</I></B><br> Local: #LSCurrencyFormat(123456, "local")#<br> Currency: #LSParseCurrency(LSCurrencyFormat(123456,"local"))#<br> International: #LSCurrencyFormat(123456, "international")#<br> None: #LSCurrencyFormat(123456, "none")#<br> <hr noshade> </cfoutput> </cfloop>