Home | History | Annotate | Download | only in i18n

Lines Matching defs:affix

103 /* affix for currency formatting when the currency sign in the pattern
490 // expanding the affix patterns into affixes.
563 AffixesForCurrency* affix = new AffixesForCurrency(
565 fAffixesForCurrency->put(*pluralCount, affix, status);
592 AffixesForCurrency* affix = new AffixesForCurrency(
594 fPluralAffixesForCurrency->put(*pluralCount, affix, status);
1731 // Then, parse against affix patterns.
1762 // Finally, parse against simple affix to find the match.
1768 // We will just use simple affix comparison (look for exact match)
2235 * Return the length matched by the given affix, or -1 if none.
2236 * Runs of white space in the affix, match runs of white space in
2243 * @param affixPat affix pattern used for currency affix comparison.
2290 * Return the length matched by the given affix, or -1 if none.
2291 * Runs of white space in the affix, match runs of white space in
2294 * @param affix pattern string, taken as a literal
2299 int32_t DecimalFormat::compareSimpleAffix(const UnicodeString& affix,
2305 UChar32 affixChar = affix.char32At(0);
2306 int32_t affixLength = affix.length();
2316 // If the affix is exactly one character long and that character
2326 UChar32 c = affix.char32At(i);
2344 c = affix.char32At(i);
2352 i = skipPatternWhiteSpace(affix, i);
2365 // is also in the affix.
2366 i = skipUWhiteSpace(affix, i);
2392 //i = skipRuleWhiteSpace(affix, i);
2393 i = skipUWhiteSpace(affix, i);
2400 UChar32 c = affix.char32At(i);
2444 * Return the length matched by the given affix, or -1 if none.
2476 const UnicodeString* affix = NULL;
2529 affix
2532 affix = &getConstSymbol(DecimalFormatSymbols::kPerMillSymbol);
2535 affix = &getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol);
2538 affix = &getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol);
2541 // fall through to affix!=0 test, which will fail
2545 if (affix != NULL) {
2546 pos = match(text, pos, *affix);
2698 // re-set currency affix patterns and currency affixes.
2728 Update the affix strings accroding to symbols in order to keep
2729 the affix strings up to date.
3193 * Expand the affix pattern strings into the expanded affix strings. If any
3194 * affix pattern string is null, do not expand it. This method should be
3195 * called any time the symbols or the affix patterns change in order to keep
3196 * the expanded affix strings up to date.
3199 * based on the currency plural count, the affix will be known only
3233 * Expand an affix pattern into an affix string. All characters in the
3245 * the stored affix patterns into actual affixes. For this usage, doFormat
3246 * must be false. Second, it is used to expand the stored affix patterns
3257 * @param affix string to receive the expanded equivalent of pattern.
3272 UnicodeString& affix,
3277 affix.remove();
3284 int beginIdx = affix.length();
3320 affix += UnicodeString(s, len);
3321 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3323 affix.append(currencyUChars, -1);
3324 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3363 affix.append(kCurrencySign);
3370 fCurrencyChoice->format(number, affix, pos);
3374 affix.append(currencyUChars, -1);
3375 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3380 affix += UnicodeString(s, len);
3381 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3385 affix += getConstSymbol(DecimalFormatSymbols::kIntlCurrencySymbol);
3387 affix += getConstSymbol(DecimalFormatSymbols::kCurrencySymbol);
3389 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3394 affix += getConstSymbol(DecimalFormatSymbols::kPercentSymbol);
3395 handler.addAttribute(kPercentField, beginIdx, affix.length());
3398 affix += getConstSymbol(DecimalFormatSymbols::kPerMillSymbol);
3399 handler.addAttribute(kPermillField, beginIdx, affix.length());
3402 affix += getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol);
3403 handler.addAttribute(kSignField, beginIdx, affix.length());
3406 affix += getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol);
3407 handler.addAttribute(kSignField, beginIdx, affix.length());
3410 affix.append(c);
3415 affix.append(c);
3421 * Append an affix to the given StringBuffer.
3447 const UnicodeString* affix;
3457 affix = isNegative ? &oneSet->negPrefixForCurrency :
3460 affix = isNegative ? &oneSet->negSuffixForCurrency :
3465 affix = isNegative ? &fNegativePrefix : &fPositivePrefix;
3467 affix = isNegative ? &fNegativeSuffix : &fPositiveSuffix;
3473 buf.append(*affix);
3476 int32_t offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kCurrencySymbol));
3482 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kIntlCurrencySymbol));
3488 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol));
3494 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kPercentSymbol));
3500 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kPerMillSymbol));
3506 return affix->length();
3510 * Appends an affix pattern to the given StringBuffer, quoting special
3511 * characters as needed. Uses the internal affix pattern, if that exists,
3512 * or the literal affix, if the internal affix pattern is null. The
3513 * appended string will generate the same affix pattern (or literal affix)
3516 * @param appendTo the affix string is appended to this
3518 * @param expAffix a corresponding expanded affix, such as fPositivePrefix.
3520 * expAffix is appended as a literal affix.
3580 * Append an affix to the given StringBuffer, using quotes if
3586 const UnicodeString& affix,
3590 needQuote = affix.indexOf(getConstSymbol(DecimalFormatSymbols::kZeroDigitSymbol)) >= 0
3591 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol)) >= 0
3592 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol)) >= 0
3593 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPercentSymbol)) >= 0
3594 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPerMillSymbol)) >= 0
3595 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kDigitSymbol)) >= 0
3596 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPatternSeparatorSymbol)) >= 0
3597 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol)) >= 0
3598 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol)) >= 0
3599 || affix.indexOf(kCurrencySign) >= 0;
3602 needQuote = affix.indexOf(kPatternZeroDigit) >= 0
3603 || affix.indexOf(kPatternGroupingSeparator) >= 0
3604 || affix.indexOf(kPatternDecimalSeparator) >= 0
3605 || affix.indexOf(kPatternPercent) >= 0
3606 || affix.indexOf(kPatternPerMill) >= 0
3607 || affix.indexOf(kPatternDigit) >= 0
3608 || affix.indexOf(kPatternSeparator) >= 0
3609 || affix.indexOf(kPatternExponent) >= 0
3610 || affix.indexOf(kPatternPlus) >= 0
3611 || affix.indexOf(kPatternMinus) >= 0
3612 || affix.indexOf(kCurrencySign) >= 0;
3616 if (affix.indexOf((UChar)0x0027 /*'\''*/) < 0)
3617 appendTo += affix;
3619 for (int32_t j = 0; j < affix.length(); ) {
3620 UChar32 c = affix.char32At(j);
3984 // The affix is either the prefix or the suffix.
3985 UnicodeString* affix = &prefix;
4111 affix = &suffix;
4140 affix->append(kQuote); // Encode currency
4145 affix->append(kCurrencySign);
4149 affix->append(kCurrencySign);
4166 affix->append(kQuote); // Encode quote
4195 affix->append(kQuote); // Encode percent/perMill
4196 affix->append(kPatternPercent); // Use unlocalized pattern char
4209 affix->append(kQuote); // Encode percent/perMill
4210 affix->append(kPatternPerMill); // Use unlocalized pattern char
4228 affix->append(kQuote); // Encode minus
4229 affix->append(kPatternMinus);
4233 affix->append(kQuote); // Encode plus
4234 affix->append(kPatternPlus);
4240 // affix.
4241 affix->append(ch);
4252 affix->append(kQuote); // Encode quote
4259 affix->append(ch);
4313 // Make sure pad is at legal position before or after affix.