A class that defines a rounding precision parameterized by a currency to be used when formatting numbers in NumberFormatter. More...
#include <numberformatter.h>
Public Member Functions | |
| Precision | withCurrency (const CurrencyUnit ¤cy) const |
| Associates a currency with this rounding precision. | |
Friends | |
| class | Precision |
A class that defines a rounding precision parameterized by a currency to be used when formatting numbers in NumberFormatter.
To create a CurrencyPrecision, use one of the factory methods on Precision.
Definition at line 880 of file numberformatter.h.
| Precision icu::number::CurrencyPrecision::withCurrency | ( | const CurrencyUnit & | currency | ) | const |
Associates a currency with this rounding precision.
Calling this method is not required, because the currency specified in unit() is automatically applied to currency rounding precisions. 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 precision. |
1.6.1