Converts a locale-specific currency string that contains the Euro symbol (€) or sign (EUR) to a number. Attempts conversion through each of the default currency formats (none, local, international). Returns the number that matches the value of string.
LSParseEuroCurrency(currency-string)
LSParseCurrency,
LSEuroCurrencyFormat,
SetLocale
Parameter |
Description |
---|---|
currency-string |
The locale-specific string to convert to a number |
The LSParseEuroCurrency
function can read the Euro symbol (€) only on Euro-enabled computers that have Euro-enabled fonts installed.
This function is similar to LSParseCurrency
, except LSParseEuroCurrency
parses only the Euro currency symbol (€) or the international Euro sign (EUR), not other currency symbols, such as the dollar sign ($) or the pound sign (£).
<!--- This example shows LSParseEuroCurrency ---> <html> <head> <title>LSParseEuroCurrency Example</title> </head> <body> <H3>LSParseEuroCurrency Example</H3> <P>LSParseEuroCurrency converts a locale-specific currency string to a number. Attempts conversion through each of the three default currency formats. <!--------------------------------------------------------- Loop through a list of locales and 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: #LSEuroCurrencyFormat(123456, "local")#<BR> Currency Number: #LSParseEuroCurrency("EUR123456")#<BR> International: #LSEuroCurrencyFormat(123456, "international")#<BR> None: #LSEuroCurrencyFormat(123456, "none")#<BR> <Hr noshade> </cfoutput> </CFLOOP> </body> </html>