private String expandAffix(String pattern,StringBuffer buffer){
  buffer.setLength(0);
  for (int i=0; i < pattern.length(); ) {
    char c=pattern.charAt(i++);
    if (c == QUOTE) {
      c=pattern.charAt(i++);
switch (c) {
case CURRENCY_SIGN:
        if (i < pattern.length() && pattern.charAt(i) == CURRENCY_SIGN) {
          ++i;
          buffer.append(symbols.getInternationalCurrencySymbol());
        }
 else {
          buffer.append(symbols.getCurrencySymbol());
        }
      continue;
case PATTERN_PERCENT:
    c=symbols.getPercent();
  break;
case PATTERN_PER_MILLE:
c=symbols.getPerMill();
break;
case PATTERN_MINUS:
c=symbols.getMinusSign();
break;
}
}
buffer.append(c);
}
return buffer.toString();
}

private String expandAffix ( String pattern , StringBuffer buffer ) { buffer . setLength ( 0 ) ; for ( int i = 0 ; i < pattern . length ( ) ; ) { char c = pattern . charAt ( i ++ ) ; if ( c == QUOTE ) { c = pattern . charAt ( i ++ ) ; switch ( c ) { case CURRENCY_SIGN : if ( i < pattern . length ( ) && pattern . charAt ( i ) == CURRENCY_SIGN ) { ++ i ; buffer . append ( symbols . getInternationalCurrencySymbol ( ) ) ; } else { buffer . append ( symbols . getCurrencySymbol ( ) ) ; } continue ; case PATTERN_PERCENT : c = symbols . getPercent ( ) ; break ; case PATTERN_PER_MILLE : c = symbols . getPerMill ( ) ; break ; case PATTERN_MINUS : c = symbols . getMinusSign ( ) ; break ; } } buffer . append ( c ) ; } return buffer . toString ( ) ; }
expand an affix pattern into an affix string . all characters in the pattern are literal unless prefixed by quote . the following characters after quote are recognized : pattern_percent , pattern_per_mille , pattern_minus , and currency_sign . if currency_sign is doubled ( quote + currency_sign + currency_sign ) , it is interpreted as an iso 4217 currency code . any other character after a quote represents itself . quote must be followed by another character ; quote may not occur by itself at the end of the pattern .
