Home | History | Annotate | Download | only in i18n

Lines Matching refs:affix

100 /* affix for currency formatting when the currency sign in the pattern
487 // expanding the affix patterns into affixes.
561 AffixesForCurrency* affix = new AffixesForCurrency(
563 fAffixesForCurrency->put(pluralCount, affix, status);
591 AffixesForCurrency* affix = new AffixesForCurrency(
593 fPluralAffixesForCurrency->put(pluralCount, affix, status);
1712 // Then, parse against affix patterns.
1744 // Finally, parse against simple affix to find the match.
1750 // We will just use simple affix comparison (look for exact match)
2104 * Return the length matched by the given affix, or -1 if none.
2105 * Runs of white space in the affix, match runs of white space in
2112 * @param affixPat affix pattern used for currency affix comparison.
2159 * Return the length matched by the given affix, or -1 if none.
2160 * Runs of white space in the affix, match runs of white space in
2163 * @param affix pattern string, taken as a literal
2168 int32_t DecimalFormat::compareSimpleAffix(const UnicodeString& affix,
2172 for (int32_t i=0; i<affix.length(); ) {
2173 UChar32 c = affix.char32At(i);
2188 if (i == affix.length()) {
2191 c = affix.char32At(i);
2199 i = skipRuleWhiteSpace(affix, i);
2212 // is also in the affix.
2213 i = skipUWhiteSpace(affix, i);
2258 * Return the length matched by the given affix, or -1 if none.
2290 const UnicodeString* affix = NULL;
2333 affix = &getConstSymbol(DecimalFormatSymbols::kPercentSymbol);
2336 affix = &getConstSymbol(DecimalFormatSymbols::kPerMillSymbol);
2339 affix = &getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol);
2342 affix = &getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol);
2345 // fall through to affix!=0 test, which will fail
2349 if (affix != NULL) {
2350 pos = match(text, pos, *affix);
2459 // re-set currency affix patterns and currency affixes.
2489 Update the affix strings accroding to symbols in order to keep
2490 the affix strings up to date.
2954 * Expand the affix pattern strings into the expanded affix strings. If any
2955 * affix pattern string is null, do not expand it. This method should be
2956 * called any time the symbols or the affix patterns change in order to keep
2957 * the expanded affix strings up to date.
2960 * based on the currency plural count, the affix will be known only
2994 * Expand an affix pattern into an affix string. All characters in the
3006 * the stored affix patterns into actual affixes. For this usage, doFormat
3007 * must be false. Second, it is used to expand the stored affix patterns
3018 * @param affix string to receive the expanded equivalent of pattern.
3033 UnicodeString& affix,
3038 affix.remove();
3045 int beginIdx = affix.length();
3085 affix += UnicodeString(s, len);
3086 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3088 affix += currencyUChars;
3089 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3128 affix.append(kCurrencySign);
3135 fCurrencyChoice->format(number, affix, pos);
3139 affix += currencyUChars;
3140 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3145 affix += UnicodeString(s, len);
3146 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3150 affix += getConstSymbol(DecimalFormatSymbols::kIntlCurrencySymbol);
3152 affix += getConstSymbol(DecimalFormatSymbols::kCurrencySymbol);
3154 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3159 affix += getConstSymbol(DecimalFormatSymbols::kPercentSymbol);
3160 handler.addAttribute(kPercentField, beginIdx, affix.length());
3163 affix += getConstSymbol(DecimalFormatSymbols::kPerMillSymbol);
3164 handler.addAttribute(kPermillField, beginIdx, affix.length());
3167 affix += getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol);
3168 handler.addAttribute(kSignField, beginIdx, affix.length());
3171 affix += getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol);
3172 handler.addAttribute(kSignField, beginIdx, affix.length());
3175 affix.append(c);
3180 affix.append(c);
3186 * Append an affix to the given StringBuffer.
3212 const UnicodeString* affix;
3222 affix = isNegative ? &oneSet->negPrefixForCurrency :
3225 affix = isNegative ? &oneSet->negSuffixForCurrency :
3230 affix = isNegative ? &fNegativePrefix : &fPositivePrefix;
3232 affix = isNegative ? &fNegativeSuffix : &fPositiveSuffix;
3238 buf.append(*affix);
3241 int32_t offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kCurrencySymbol));
3247 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kIntlCurrencySymbol));
3253 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol));
3259 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kPercentSymbol));
3265 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kPerMillSymbol));
3271 return affix->length();
3275 * Appends an affix pattern to the given StringBuffer, quoting special
3276 * characters as needed. Uses the internal affix pattern, if that exists,
3277 * or the literal affix, if the internal affix pattern is null. The
3278 * appended string will generate the same affix pattern (or literal affix)
3281 * @param appendTo the affix string is appended to this
3283 * @param expAffix a corresponding expanded affix, such as fPositivePrefix.
3285 * expAffix is appended as a literal affix.
3345 * Append an affix to the given StringBuffer, using quotes if
3351 const UnicodeString& affix,
3355 needQuote = affix.indexOf(getConstSymbol(DecimalFormatSymbols::kZeroDigitSymbol)) >= 0
3356 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol)) >= 0
3357 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol)) >= 0
3358 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPercentSymbol)) >= 0
3359 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPerMillSymbol)) >= 0
3360 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kDigitSymbol)) >= 0
3361 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPatternSeparatorSymbol)) >= 0
3362 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol)) >= 0
3363 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol)) >= 0
3364 || affix.indexOf(kCurrencySign) >= 0;
3367 needQuote = affix.indexOf(kPatternZeroDigit) >= 0
3368 || affix.indexOf(kPatternGroupingSeparator) >= 0
3369 || affix.indexOf(kPatternDecimalSeparator) >= 0
3370 || affix.indexOf(kPatternPercent) >= 0
3371 || affix.indexOf(kPatternPerMill) >= 0
3372 || affix.indexOf(kPatternDigit) >= 0
3373 || affix.indexOf(kPatternSeparator) >= 0
3374 || affix.indexOf(kPatternExponent) >= 0
3375 || affix.indexOf(kPatternPlus) >= 0
3376 || affix.indexOf(kPatternMinus) >= 0
3377 || affix.indexOf(kCurrencySign) >= 0;
3381 if (affix.indexOf((UChar)0x0027 /*'\''*/) < 0)
3382 appendTo += affix;
3384 for (int32_t j = 0; j < affix.length(); ) {
3385 UChar32 c = affix.char32At(j);
3749 // The affix is either the prefix or the suffix.
3750 UnicodeString* affix = &prefix;
3876 affix = &suffix;
3905 affix->append(kQuote); // Encode currency
3910 affix->append(kCurrencySign);
3914 affix->append(kCurrencySign);
3931 affix->append(kQuote); // Encode quote
3960 affix->append(kQuote); // Encode percent/perMill
3961 affix->append(kPatternPercent); // Use unlocalized pattern char
3974 affix->append(kQuote); // Encode percent/perMill
3975 affix->append(kPatternPerMill); // Use unlocalized pattern char
3993 affix->append(kQuote); // Encode minus
3994 affix->append(kPatternMinus);
3998 affix->append(kQuote); // Encode plus
3999 affix->append(kPatternPlus);
4005 // affix.
4006 affix->append(ch);
4017 affix->append(kQuote); // Encode quote
4024 affix->append(ch);
4078 // Make sure pad is at legal position before or after affix.