User Guide

764 Chapter 3: ColdFusion Functions
For a list of the locale-specific formats used to parse the currency, see LSCurrencyFormat.
Example
<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.78, "local")#<br>
Parsed local Currency:
#LSParseCurrency(LSCurrencyFormat(123456,"local"))#<br>
International: #LSCurrencyFormat(123456.78999, "international")#<br>
Parsed International Currency:
#LSParseCurrency(LSCurrencyFormat(123456.78999,"international"))#<br>
None: #LSCurrencyFormat(123456.78999, "none")#<br>
Parsed None formatted currency:
#LSParseCurrency(LSCurrencyFormat(123456.78999,"none"))#<br>
<hr noshade>
</cfoutput>
</cfloop>