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

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

const UChar * 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...

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

double 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

const UChar* 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.
Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

int32_t 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
Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

double 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
Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

const UChar* 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.
Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.


Generated on Wed Dec 18 16:50:30 2002 for ICU 2.4 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001