Lines Matching defs:affix

156 /* affix for currency formatting when the currency sign in the pattern
581 // expanding the affix patterns into affixes.
661 AffixesForCurrency* affix = new AffixesForCurrency(
663 fAffixesForCurrency->put(*pluralCount, affix, status);
690 AffixesForCurrency* affix = new AffixesForCurrency(
692 fPluralAffixesForCurrency->put(*pluralCount, affix, status);
2286 // Then, parse against affix patterns.
2298 debug("trying affix for currency..");
2323 // Finally, parse against simple affix to find the match.
2329 // We will just use simple affix comparison (look for exact match)
2332 // TODO: We should parse against simple affix first when
2972 * Return the length matched by the given affix, or -1 if none.
2973 * Runs of white space in the affix, match runs of white space in
2980 * @param affixPat affix pattern used for currency affix comparison.
3041 UnicodeString& DecimalFormat::trimMarksFromAffix(const UnicodeString& affix, UnicodeString& trimmedAffix) {
3043 int32_t affixLen = affix.length();
3047 UChar c = affix.charAt(affixPos);
3057 return (trimLen > 0)? trimmedAffix.setTo(trimBuf, trimLen): trimmedAffix.setTo(affix);
3061 * Return the length matched by the given affix, or -1 if none.
3062 * Runs of white space in the affix, match runs of white space in
3065 * @param affix pattern string, taken as a literal
3070 int32_t DecimalFormat::compareSimpleAffix(const UnicodeString& affix,
3078 trimMarksFromAffix(affix, trimmedAffix);
3273 * Return the length matched by the given affix, or -1 if none.
3305 const UnicodeString* affix = NULL;
3358 affix = &getConstSymbol(DecimalFormatSymbols::kPercentSymbol);
3361 affix = &getConstSymbol(DecimalFormatSymbols::kPerMillSymbol);
3364 affix = &getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol);
3367 affix = &getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol);
3370 // fall through to affix!=0 test, which will fail
3374 if (affix != NULL) {
3375 pos = match(text, pos, *affix);
3533 // re-set currency affix patterns and currency affixes.
3569 Update the affix strings accroding to symbols in order to keep
3570 the affix strings up to date.
4085 * Expand the affix pattern strings into the expanded affix strings. If any
4086 * affix pattern string is null, do not expand it. This method should be
4087 * called any time the symbols or the affix patterns change in order to keep
4088 * the expanded affix strings up to date.
4091 * based on the currency plural count, the affix will be known only
4125 * Expand an affix pattern into an affix string. All characters in the
4137 * the stored affix patterns into actual affixes. For this usage, doFormat
4138 * must be false. Second, it is used to expand the stored affix patterns
4149 * @param affix string to receive the expanded equivalent of pattern.
4164 UnicodeString& affix,
4169 affix.remove();
4176 int beginIdx = affix.length();
4212 affix += UnicodeString(s, len);
4213 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
4215 affix.append(currencyUChars, -1);
4216 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
4255 affix.append(kCurrencySign);
4262 fCurrencyChoice->format(number, affix, pos);
4266 affix.append(currencyUChars, -1);
4267 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
4272 affix += UnicodeString(s, len);
4273 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
4277 affix += getConstSymbol(DecimalFormatSymbols::kIntlCurrencySymbol);
4279 affix += getConstSymbol(DecimalFormatSymbols::kCurrencySymbol);
4281 handler.addAttribute(kCurrencyField, beginIdx, affix.length());
4286 affix += getConstSymbol(DecimalFormatSymbols::kPercentSymbol);
4287 handler.addAttribute(kPercentField, beginIdx, affix.length());
4290 affix += getConstSymbol(DecimalFormatSymbols::kPerMillSymbol);
4291 handler.addAttribute(kPermillField, beginIdx, affix.length());
4294 affix += getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol);
4295 handler.addAttribute(kSignField, beginIdx, affix.length());
4298 affix += getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol);
4299 handler.addAttribute(kSignField, beginIdx, affix.length());
4302 affix.append(c);
4307 affix.append(c);
4313 * Append an affix to the given StringBuffer.
4339 const UnicodeString* affix;
4357 affix = isNegative ? &oneSet->negPrefixForCurrency :
4360 affix = isNegative ? &oneSet->negSuffixForCurrency :
4365 affix = isNegative ? &fNegativePrefix : &fPositivePrefix;
4367 affix = isNegative ? &fNegativeSuffix : &fPositiveSuffix;
4373 buf.append(*affix);
4376 int32_t offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kCurrencySymbol));
4382 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kIntlCurrencySymbol));
4388 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol));
4394 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kPercentSymbol));
4400 offset = (int) (*affix).indexOf(getConstSymbol(DecimalFormatSymbols::kPerMillSymbol));
4406 return affix->length();
4410 * Appends an affix pattern to the given StringBuffer, quoting special
4411 * characters as needed. Uses the internal affix pattern, if that exists,
4412 * or the literal affix, if the internal affix pattern is null. The
4413 * appended string will generate the same affix pattern (or literal affix)
4416 * @param appendTo the affix string is appended to this
4418 * @param expAffix a corresponding expanded affix, such as fPositivePrefix.
4420 * expAffix is appended as a literal affix.
4480 * Append an affix to the given StringBuffer, using quotes if
4486 const UnicodeString& affix,
4490 needQuote = affix.indexOf(getConstSymbol(DecimalFormatSymbols::kZeroDigitSymbol)) >= 0
4491 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol)) >= 0
4492 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol)) >= 0
4493 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPercentSymbol)) >= 0
4494 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPerMillSymbol)) >= 0
4495 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kDigitSymbol)) >= 0
4496 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPatternSeparatorSymbol)) >= 0
4497 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kPlusSignSymbol)) >= 0
4498 || affix.indexOf(getConstSymbol(DecimalFormatSymbols::kMinusSignSymbol)) >= 0
4499 || affix.indexOf(kCurrencySign) >= 0;
4502 needQuote = affix.indexOf(kPatternZeroDigit) >= 0
4503 || affix.indexOf(kPatternGroupingSeparator) >= 0
4504 || affix.indexOf(kPatternDecimalSeparator) >= 0
4505 || affix.indexOf(kPatternPercent) >= 0
4506 || affix.indexOf(kPatternPerMill) >= 0
4507 || affix.indexOf(kPatternDigit) >= 0
4508 || affix.indexOf(kPatternSeparator) >= 0
4509 || affix.indexOf(kPatternExponent) >= 0
4510 || affix.indexOf(kPatternPlus) >= 0
4511 || affix.indexOf(kPatternMinus) >= 0
4512 || affix.indexOf(kCurrencySign) >= 0;
4516 if (affix.indexOf((UChar)0x0027 /*'\''*/) < 0)
4517 appendTo += affix;
4519 for (int32_t j = 0; j < affix.length(); ) {
4520 UChar32 c = affix.char32At(j);
4884 // The affix is either the prefix or the suffix.
4885 UnicodeString* affix = &prefix;
5011 affix = &suffix;
5040 affix->append(kQuote); // Encode currency
5045 affix->append(kCurrencySign);
5049 affix->append(kCurrencySign);
5066 affix->append(kQuote); // Encode quote
5095 affix->append(kQuote); // Encode percent/perMill
5096 affix->append(kPatternPercent); // Use unlocalized pattern char
5109 affix->append(kQuote); // Encode percent/perMill
5110 affix->append(kPatternPerMill); // Use unlocalized pattern char
5128 affix->append(kQuote); // Encode minus
5129 affix->append(kPatternMinus);
5133 affix->append(kQuote); // Encode plus
5134 affix->append(kPatternPlus);
5140 // affix.
5141 affix->append(ch);
5152 affix->append(kQuote); // Encode quote
5159 affix->append(ch);
5213 // Make sure pad is at legal position before or after affix.