Lines Matching refs:currency
98 /* For currency parsing purose,
100 * every currency format pattern,
102 * and plural currency style. And the patterns are set through applyPattern.
128 /* affix for currency formatting when the currency sign in the pattern
129 * equals to 3, such as the pattern contains 3 currency sign or
130 * the formatter style is currency plural format style.
239 * The CURRENCY_SIGN is the standard Unicode symbol for currency. It
240 * is used in patterns and substitued with either the currency symbol,
241 * or if it is doubled, with the international currency symbol. If the
466 // If it looks like we are going to use a currency pattern
499 // initialize for currency, not only for plural format,
522 // If it was a currency format, apply the appropriate rounding by
523 // resetting the currency. NOTE: this copies fCurrency on top of itself.
552 // Save the default currency patterns of this locale.
586 // save the unique currency plural patterns of this locale.
1937 * Parses the given text as a number, optionally providing a currency amount.
1945 * @param currency if non-NULL, it should point to a 4-UChar buffer.
1946 * In this case the text is parsed as a currency format, and the
1947 * ISO 4217 code for the parsed currency is put into the buffer.
1948 * Otherwise the text is parsed as a non-currency format.
1953 UChar* currency) const {
2003 status, currency)) {
2011 parsePosition, *digits, status, currency)) {
2065 UChar* currency) const {
2082 tmpPos, tmpDigitList, tmpStatus, currency);
2088 tmpPos, tmpDigitList, tmpStatus, currency);
2102 // Those are currency patterns and currency plural patterns.
2117 tmpPos, tmpDigitList, tmpStatus, currency);
2151 currency);
2185 * @param currencyParsing whether it is currency parsing or not.
2186 * @param type the currency type to parse against, LONG_NAME only or not.
2192 * @param currency return value for parsed currency, for generic
2193 * currency parsing mode, or NULL for normal parsing. In generic
2194 * currency parsing mode, any currency is parsed, not just the
2195 * currency that this formatter is set to.
2206 UChar* currency) const
2361 int32_t posMatch = compareAffix(text, position, FALSE, TRUE, posPrefix, currencyParsing, type, currency);
2362 int32_t negMatch = compareAffix(text, position, TRUE, TRUE, negPrefix, currencyParsing, type, currency);
2690 posSuffixMatch = compareAffix(text, position, FALSE, FALSE, posSuffix, currencyParsing, type, currency);
2693 negSuffixMatch = compareAffix(text, position, TRUE, FALSE, negSuffix, currencyParsing, type, currency);
2783 * @param affixPat affix pattern used for currency affix comparison.
2784 * @param currencyParsing whether it is currency parsing or not
2785 * @param type the currency type to parse against, LONG_NAME only or not.
2786 * @param currency return value for parsed currency, for generic
2787 * currency parsing mode, or null for normal parsing. In generic
2788 * currency parsing mode, any currency is parsed, not just the
2789 * currency that this formatter is set to.
2799 UChar* currency) const
2802 if (fCurrencyChoice != NULL || currency != NULL ||
2806 return compareComplexAffix(*affixPat, text, pos, type, currency);
2985 * @param type the currency type to parse against, LONG_NAME only or not.
2986 * @param currency return value for parsed currency, for generic
2987 * currency parsing mode, or null for normal parsing. In generic
2988 * currency parsing mode, any currency is parsed, not just the
2989 * currency that this formatter is set to.
2996 UChar* currency) const
2999 U_ASSERT(currency != NULL ||
3017 // since the currency names in choice format is saved
3018 // the same way as other currency names,
3019 currency choice parsing here.
3020 // the general currency parsing parse against all names,
3033 // Parse generic currency -- anything for which we
3041 // Delegate parse of display name => ISO code to Currency
3044 // If parse succeeds, populate currency[0]
3046 if (currency) {
3047 u_strcpy(currency, curr);
3049 // The formatter is currency-style but the client has not requested
3050 // the value of the parsed currency. In this case, if that value does
3206 // If the currency symbols are the same, there is no need to recalculate.
3241 // re-set currency affix patterns and currency affixes.
3270 * Update the currency object to match the symbols. This method
3282 // With the introduction of the Currency object, the currency
3286 // currency object to one for that locale. If it is custom,
3287 // we set the currency to null.
3300 // Trap an error in mapping locale to currency. If we can't
3301 // map, then don't fail and set the currency to "".
3797 * This method also will be called before formatting if format currency
3799 * based on the currency plural count, the affix will be known only
3800 * after the currency plural count is know.
3802 * 'pluralCount' will be a non-null currency plural count.
3838 * currency sign. If CURRENCY_SIGN is tripled, it is interpreted as
3839 * currency plural long names, such as "US Dollars".
3848 * which a currency format references a ChoiceFormat (e.g., en_IN display
3852 * currencyChoice to a ChoiceFormat object, if the currency's display name
3860 * currency symbol is encountered that expands to a ChoiceFormat, the
3864 * @param pluralCount the plural count. It is only used for currency
3866 * count of the currency amount. For example,
3887 // As of ICU 2.2 we use the currency object, and
3888 // ignore the currency symbols in the DFS, unless
3889 // we have a null currency object. This occurs if
3909 // which means when formatting currency plural names.
3938 // If the currency is handled by a ChoiceFormat,
3972 // We only arrive here if the currency choice
4561 // currency symbols are recognized and translated.
4740 affix->append(kQuote); // Encode currency
4741 // Use lookahead to determine if the currency sign is
5259 // If we are a currency format, then modify our affixes to
5260 // encode the currency symbol for the given currency in our
5262 // given currency.
5267 // NULL or empty currency is *legal* and indicates no currency.
5281 // NULL or empty currency is *legal* and indicates no currency.
5295 // set the currency before compute affixes to get the right currency names
5303 // set the currency after apply pattern to get the correct rounding/fraction