Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ucurr.h File Reference

#include "unicode/utypes.h"

Go to the source code of this file.

Functions

U_CAPI const UChar *U_EXPORT2 ucurr_forLocale (const char *locale, UErrorCode *ec)
 Returns a currency code for the default currency in the given locale. More...

U_CAPI const UChar *U_EXPORT2 ucurr_getSymbol (const UChar *currency, const char *locale, int32_t *len, UErrorCode *ec)
 Returns the display string for the given currency in the given locale. More...

U_CAPI int32_t U_EXPORT2 ucurr_getDefaultFractionDigits (const UChar *currency)
 Returns the number of the number of fraction digits that should be displayed for the given currency. More...

U_CAPI double U_EXPORT2 ucurr_getRoundingIncrement (const UChar *currency)
 Returns the rounding increment for the given currency, or 0.0 if no rounding is done by the currency. More...


Function Documentation

U_CAPI const UChar* U_EXPORT2 ucurr_forLocale const char *    locale,
UErrorCode   ec
 

Returns a currency code for the default currency in the given locale.

Parameters:
locale  the locale for which to retrieve a currency code
ec  error code
Returns:
a pointer to a 3-character ISO 4217 currency code, or NULL if none is found. The result string may NOT be null terminated.

U_CAPI int32_t U_EXPORT2 ucurr_getDefaultFractionDigits const UChar *    currency
 

Returns the number of the number of fraction digits that should be displayed for the given currency.

Parameters:
currency  null-terminated 3-letter ISO 4217 code
Returns:
a non-negative number of fraction digits to be displayed

U_CAPI double U_EXPORT2 ucurr_getRoundingIncrement const UChar *    currency
 

Returns the rounding increment for the given currency, or 0.0 if no rounding is done by the currency.

Parameters:
currency  null-terminated 3-letter ISO 4217 code
Returns:
the non-negative rounding increment, or 0.0 if none

U_CAPI const UChar* U_EXPORT2 ucurr_getSymbol const UChar *    currency,
const char *    locale,
int32_t   len,
UErrorCode   ec
 

Returns the display string for the given currency in the given locale.

For example, the display string for the USD currency object in the en_US locale is "$".

Parameters:
currency  null-terminated 3-letter ISO 4217 code
locale  locale in which to display currency
len  fill-in parameter to receive length of result
ec  error code
Returns:
pointer to display string of 'len' UChars. If the resource data contains no entry for 'currency', then 'currency' itself is returned. The result string may NOT be null terminated.


Generated on Thu Aug 15 14:13:41 2002 for ICU 2.2 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001