Home | History | Annotate | Download | only in numfmt

Lines Matching refs:currency

85 // currency formatting ----------------------------------------------------- ***
88 * Set a currency on a NumberFormat with pre-ICU 2.6 APIs.
92 * @param nf The NumberFormat on which to set the currency; takes effect on
93 * currency-formatting NumberFormat instances.
97 * while the currency symbol and number of decimals are set for
98 * the currency.
99 * @param currency The 3-letter ISO 4217 currency code, NUL-terminated.
103 setNumberFormatCurrency_2_4(NumberFormat &nf, const char *currency, UErrorCode &errorCode) {
108 if(currency==NULL || strlen(currency)!=3) {
115 // the currency symbol
122 // map the currency code to a locale ID
124 // it would be possible to map to a locale ID, instantiate a currency
128 // ISO currency ID
129 const char *currency;
145 // Unicode string with the desired currency display symbol or name
157 if(strcmp(currency, currencyMap[i].currency)==0) {
167 // set the currency-related data into the caller's formatter
180 * Set a currency on a NumberFormat with ICU 2.6 APIs.
182 * @param nf The NumberFormat on which to set the currency; takes effect on
183 * currency-formatting NumberFormat instances.
186 * while the currency symbol and number of decimals are set for
187 * the currency.
188 * @param currency The 3-letter ISO 4217 currency code, NUL-terminated.
192 setNumberFormatCurrency_2_6(NumberFormat &nf, const char *currency, UErrorCode &errorCode) {
196 if(currency==NULL || strlen(currency)!=3) {
203 u_charsToUChars(currency, uCurrency, 4);
205 // set the currency
217 // pick up number/currency format patterns
239 printf("show currency formatting (method for %s) in the locale \"%s\"\n",
243 // get a currency formatter for this locale ID
253 printf(" - format currency \"%s\": ", sampleCurrencies[j]);
255 // set the actual currency to be formatted
267 // output=formatted currency value