A class that defines a rounding strategy parameterized by a currency to be used when formatting numbers in NumberFormatter. More...
#include <numberformatter.h>
Public Member Functions | |
| Rounder | withCurrency (const CurrencyUnit ¤cy) const |
| Associates a currency with this rounding strategy. | |
Friends | |
| class | Rounder |
A class that defines a rounding strategy parameterized by a currency to be used when formatting numbers in NumberFormatter.
To create a CurrencyRounder, use one of the factory methods on Rounder.
Definition at line 940 of file numberformatter.h.
| Rounder icu::number::CurrencyRounder::withCurrency | ( | const CurrencyUnit & | currency | ) | const |
Associates a currency with this rounding strategy.
Calling this method is not required, because the currency specified in unit() is automatically applied to currency rounding strategies. However, this method enables you to override that automatic association.
This method also enables numbers to be formatted using currency rounding rules without explicitly using a currency format.
| currency | The currency to associate with this rounding strategy. |
1.6.1