Macromedia coldfusion 4.5-cfml language reference ユーザーズマニュアル

ページ / 608
458
CFML Language Reference 
LSParseEuroCurrency
Converts a locale-specific currency string that contains the Euro symbol (
€) or sign 
(EUR) to a number. Attempts conversion through each of the three default currency 
formats (none, local, international). Returns the number matching the value of string.
See, also, 
LSParseCurrency
LSEuroCurrencyFormat
 and 
SetLocale
.
Syntax
LSParseEuroCurrency(
currency-string)
currency-string
The locale-specific string you want to convert to a number.
Usage
The LSParseEuroCurrency function can read the Euro symbol (
€) only on Euro-
enabled computers, such as Windows NT 4.0 SP4, that have Euro-enabled fonts 
installed. 
This function is similar to LSParseCurrency except that 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 (
£).
Example
<!--- 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 possible 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>