Home | History | Annotate | Download | only in i18n

Lines Matching refs:affix

119 /* affix for currency formatting when the currency sign in the pattern
544 // expanding the affix patterns into affixes.
624 AffixesForCurrency* affix = new AffixesForCurrency(
626 fAffixesForCurrency->put(*pluralCount, affix, status);
653 AffixesForCurrency* affix = new AffixesForCurrency(
655 fPluralAffixesForCurrency->put(*pluralCount, affix, status);
2025 // Then, parse against affix patterns.
2056 // Finally, parse against simple affix to find the match.
2062 // We will just use simple affix comparison (look for exact match)
2699 * Return the length matched by the given affix, or -1 if none.
2700 * Runs of white space in the affix, match runs of white space in
2707 * @param affixPat affix pattern used for currency affix comparison.
2754 * Return the length matched by the given affix, or -1 if none.
2755 * Runs of white space in the affix, match runs of white space in
2758 * @param affix pattern string, taken as a literal
2763 int32_t DecimalFormat::compareSimpleAffix(const UnicodeString& affix,
2768 UChar32 affixChar = affix.char32At(0);
2769 int32_t affixLength = affix.length();
2777 // If the affix is exactly one character long and that character
2787 UChar32 c = affix.char32At(i);
2805 c = affix.char32At(i);
2813 i = skipPatternWhiteSpace(affix, i);
2826 // is also in the affix.
2827 i = skipUWhiteSpace(affix, i);
2853 //i = skipRuleWhiteSpace(affix, i);
2854 i = skipUWhiteSpace(affix, i);
2861 UChar32 c = affix.char32At(i);
2905 * Return the length matched by the given affix, or -1 if none.
2937 const UnicodeString* affix = NULL;
2990 affix = &getConstSymbol(DecimalFormatSymbols::kPercentSymbol);
2993 affix = &getConstSymbol(DecimalFormatSymbols::kPerMillSymbol);
2996 affix = &getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol);
2999 affix = &getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol);
3002 // fall through to affix!=0 test, which will fail
3006 if (affix != NULL) {
3007 pos = match(text, pos, *affix);
3165 // re-set currency affix patterns and currency affixes.
3201 Update the affix strings accroding to symbols in order to keep
3202 the affix strings up to date.
3717 * Expand the affix pattern strings into the expanded affix strings. If any
3718 * affix pattern string is null, do not expand it. This method should be
3719 * called any time the symbols or the affix patterns change in order to keep
3720 * the expanded affix strings up to date.
3723 * based on the currency plural count, the affix will be known only
3757 * Expand an affix pattern into an affix string. All characters in the
3769 * the stored affix patterns into actual affixes. For this usage, doFormat
3770 * must be false. Second, it is used to expand the stored affix patterns
3781 * @param affix string to receive the expanded equivalent of pattern.
3796 UnicodeString& affix,
3801 affix.remove();
3808 int beginIdx = affix.length();
3844 affix += UnicodeString(s, len);
3845 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3847 affix.append(currencyUChars, -1);
3848 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3887 affix.append(kCurrencySign);
3894 fCurrencyChoice->format(number, affix, pos);
3898 affix.append(currencyUChars, -1);
3899 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3904 affix += UnicodeString(s, len);
3905 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3909 affix += getConstSymbol(DecimalFormatSymbols::kIntlCurrencySymbol);
3911 affix += getConstSymbol(DecimalFormatSymbols::kCurrencySymbol);
3913 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
3918 affix += getConstSymbol(DecimalFormatSymbols::kPercentSymbol);
3919 handler.addAttribute(kPercentField, beginIdx, affix.length());
3922 affix += getConstSymbol(DecimalFormatSymbols::kPerMillSymbol);
3923 handler.addAttribute(kPermillField, beginIdx, affix.length());
3926 affix += getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol);
3927 handler.addAttribute(kSignField, beginIdx, affix.length());
3930 affix += getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol);
3931 handler.addAttribute(kSignField, beginIdx, affix.length());
3934 affix.append(c);
3939 affix.append(c);
3945 * Append an affix to the given StringBuffer.
3971 const UnicodeString* affix;
3981 affix = isNegative ? &oneSet->negPrefixForCurrency :
3984 affix = isNegative ? &oneSet->negSuffixForCurrency :
3989 affix = isNegative ? &fNegativePrefix : &fPositivePrefix;
3991 affix = isNegative ? &fNegativeSuffix : &fPositiveSuffix;
3997 buf.append(*affix);
4000 int32_t offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kCurrencySymbol));
4006 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kIntlCurrencySymbol));
4012 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol));
4018 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kPercentSymbol));
4024 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kPerMillSymbol));
4030 return affix->length();
4034 * Appends an affix pattern to the given StringBuffer, quoting special
4035 * characters as needed. Uses the internal affix pattern, if that exists,
4036 * or the literal affix, if the internal affix pattern is null. The
4037 * appended string will generate the same affix pattern (or literal affix)
4040 * @param appendTo the affix string is appended to this
4042 * @param expAffix a corresponding expanded affix, such as fPositivePrefix.
4044 * expAffix is appended as a literal affix.
4104 * Append an affix to the given StringBuffer, using quotes if
4110 const UnicodeString& affix,
4114 needQuote = affix.indexOf(getConstSymbol(DecimalFormatSymbols::kZeroDigitSymbol)) >= 0
4115 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol)) >= 0
4116 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol)) >= 0
4117 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPercentSymbol)) >= 0
4118 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPerMillSymbol)) >= 0
4119 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kDigitSymbol)) >= 0
4120 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPatternSeparatorSymbol)) >= 0
4121 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol)) >= 0
4122 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol)) >= 0
4123 || affix.indexOf(kCurrencySign) >= 0;
4126 needQuote = affix.indexOf(kPatternZeroDigit) >= 0
4127 || affix.indexOf(kPatternGroupingSeparator) >= 0
4128 || affix.indexOf(kPatternDecimalSeparator) >= 0
4129 || affix.indexOf(kPatternPercent) >= 0
4130 || affix.indexOf(kPatternPerMill) >= 0
4131 || affix.indexOf(kPatternDigit) >= 0
4132 || affix.indexOf(kPatternSeparator) >= 0
4133 || affix.indexOf(kPatternExponent) >= 0
4134 || affix.indexOf(kPatternPlus) >= 0
4135 || affix.indexOf(kPatternMinus) >= 0
4136 || affix.indexOf(kCurrencySign) >= 0;
4140 if (affix.indexOf((UChar)0x0027 /*'\''*/) < 0)
4141 appendTo += affix;
4143 for (int32_t j = 0; j < affix.length(); ) {
4144 UChar32 c = affix.char32At(j);
4508 // The affix is either the prefix or the suffix.
4509 UnicodeString* affix = &prefix;
4635 affix = &suffix;
4664 affix->append(kQuote); // Encode currency
4669 affix->append(kCurrencySign);
4673 affix->append(kCurrencySign);
4690 affix->append(kQuote); // Encode quote
4719 affix->append(kQuote); // Encode percent/perMill
4720 affix->append(kPatternPercent); // Use unlocalized pattern char
4733 affix->append(kQuote); // Encode percent/perMill
4734 affix->append(kPatternPerMill); // Use unlocalized pattern char
4752 affix->append(kQuote); // Encode minus
4753 affix->append(kPatternMinus);
4757 affix->append(kQuote); // Encode plus
4758 affix->append(kPatternPlus);
4764 // affix.
4765 affix->append(ch);
4776 affix->append(kQuote); // Encode quote
4783 affix->append(ch);
4837 // Make sure pad is at legal position before or after affix.