Lines Matching defs:currency
38 // Default currency meta data of last resort. We try to use the
99 * Unfortunately, we have to convert the UChar* currency code to char*
103 myUCharsToChars(char* resultOfLen4, const UChar* currency) {
104 u_UCharsToChars(currency, resultOfLen4, ISO_COUNTRY_CODE_LENGTH);
110 * Internal function to look up currency data. Result is an array of
116 _findMetaData(const UChar* currency, UErrorCode& ec) {
118 if (currency == 0 || *currency == 0) {
137 // Look up our currency, or if that's not available, then DEFAULT
140 UResourceBundle* rb = ures_getByKey(currencyMeta, myUCharsToChars(buf, currency), NULL, &ec2);
301 * Release all static memory held by currency.
315 * There might be some cached currency data.
361 if ((resLen = uloc_getKeywordValue(locale, "currency", id, ULOC_FULLNAME_CAPACITY, &localStatus))) {
362 // there is a currency keyword. Try to see if it's valid
364 /* Normalize the currency keyword value to upper case. */
402 an old version of ICU that hasn't been updated yet. The latest currency is
469 ucurr_getName(const UChar* currency,
498 // fallback. That is, if a currency is not found in the en_US
518 myUCharsToChars(buf, currency);
562 *len = u_strlen(currency); // Should == ISO_COUNTRY_CODE_LENGTH, but maybe not...?
564 return currency;
568 ucurr_getPluralName(const UChar* currency,
601 myUCharsToChars(buf, currency);
620 return ucurr_getName(currency, locale, UCURR_LONG_NAME,
638 *len = u_strlen(currency); // Should == ISO_COUNTRY_CODE_LENGTH, but maybe not...?
640 return currency;
645 // Following are structure and function for parsing currency names
692 // Give a locale, return the maximum number of currency names associated with
694 // It gets currency names from resource bundles using fallback.
696 // currency names are duplicated.
697 // For example, given locale as "en_US", the currency names get from resource
699 // all currency names in "en_US" and "en".
732 ++(*total_currency_symbol_count); // currency symbol
740 // currency plurals
776 // Collect all available currency names associated with the give locale
780 // return the malloc-ed currency name arrays and the total number of currency
799 // Get maximum currency name count first.
807 const UChar* s = NULL; // currency name
808 char* iso = NULL; // currency ISO code
864 // Add currency symbol.
871 // Add currency long name.
880 // Add currency ISO code.
891 // currency plurals
913 // currency long name?
942 printf("currency name count: %d\n", *total_currency_name_count);
953 printf("currency symbol count: %d\n", *total_currency_symbol_count);
967 // @param currencyNames: currency names array
968 // @param indexInCurrencyNames: the index of the character in currency names
971 // @param begin(IN/OUT): the begin index of matching range in currency names array
972 // @param end(IN/OUT): the end index of matching range in currency names array.
1108 // Find longest match between "text" and currency names in "currencyNames".
1109 // @param total_currency_count: total number of currency names in CurrencyNames.
1126 // For example, given the currency names in currencyNames array are:
1130 // the first char in currency names, and find the first char matching range
1133 // the 2nd char in currency names, and narrow the matching range to
1165 //========================= currency name cache =====================
1168 // currency names, case insensitive
1170 int32_t totalCurrencyNameCount; // currency name count
1171 // currency symbols and ISO code, case sensitive
1328 // case in-sensitive comparision against currency names
1339 // case sensitive comparison against currency symbols and ISO code.
1368 * Internal method. Given a currency ISO code and a locale, return
1369 * the "static" currency name. This is usually the same as the
1374 * This is used for backward compatibility with old currency logic in
1388 // If this is a ChoiceFormat currency, then format an
1405 ucurr_getDefaultFractionDigits(const UChar* currency, UErrorCode* ec) {
1406 return (_findMetaData(currency, *ec))[0];
1410 ucurr_getRoundingIncrement(const UChar* currency, UErrorCode* ec) {
1411 const int32_t *data = _findMetaData(currency, *ec);
1446 const char *currency;
1757 for (int32_t idx = 0; gCurrencyList[idx].currency != NULL; idx++) {
1778 *resultLength = 3; /* Currency codes are only 3 chars long */
1780 return currItem->currency;
1848 resLen = uloc_getKeywordValue(locale, "currency", id, ULOC_FULLNAME_CAPACITY, &localStatus);
1868 // Using the id derived from the local, get the currency data
1871 // process each currency to see which one is valid for the given date
1876 // get the currency resource
1963 resLen = uloc_getKeywordValue(locale, "currency", id, ULOC_FULLNAME_CAPACITY, &localStatus);
1983 // Using the id derived from the local, get the currency data
1986 // process each currency to see which one is valid for the given date
1999 // get the currency resource
2073 // write out the currency value
2082 // return null terminated currency string
2204 // Currently active currency for the target country