Home | History | Annotate | Download | only in numfmt

Lines Matching full:currency

87 // currency formatting ----------------------------------------------------- ***
90 * Set a currency on a NumberFormat with pre-ICU 2.6 APIs.
94 * @param nf The NumberFormat on which to set the currency; takes effect on
95 * currency-formatting NumberFormat instances.
99 * while the currency symbol and number of decimals are set for
100 * the currency.
101 * @param currency The 3-letter ISO 4217 currency code, NUL-terminated.
105 setNumberFormatCurrency_2_4(NumberFormat &nf, const char *currency, UErrorCode &errorCode) {
110 if(currency==NULL || strlen(currency)!=3) {
117 // the currency symbol
124 // map the currency code to a locale ID
126 // it would be possible to map to a locale ID, instantiate a currency
130 // ISO currency ID
131 const char *currency;
147 // Unicode string with the desired currency display symbol or name
159 if(strcmp(currency, currencyMap[i].currency)==0) {
169 // set the currency-related data into the caller's formatter
182 * Set a currency on a NumberFormat with ICU 2.6 APIs.
184 * @param nf The NumberFormat on which to set the currency; takes effect on
185 * currency-formatting NumberFormat instances.
188 * while the currency symbol and number of decimals are set for
189 * the currency.
190 * @param currency The 3-letter ISO 4217 currency code, NUL-terminated.
194 setNumberFormatCurrency_2_6(NumberFormat &nf, const char *currency, UErrorCode &errorCode) {
198 if(currency==NULL || strlen(currency)!=3) {
205 u_charsToUChars(currency, uCurrency, 4);
207 // set the currency
219 // pick up number/currency format patterns
241 printf("show currency formatting (method for %s) in the locale \"%s\"\n",
245 // get a currency formatter for this locale ID
255 printf(" - format currency \"%s\": ", sampleCurrencies[j]);
257 // set the actual currency to be formatted
269 // output=formatted currency value