An input type for SimpleNumberFormatter.
More...
#include <simplenumberformatter.h>
|
void | multiplyByPowerOfTen (int32_t power, UErrorCode &status) |
| Changes the value of the SimpleNumber by a power of 10.
|
|
void | roundTo (int32_t power, UNumberFormatRoundingMode roundingMode, UErrorCode &status) |
| Rounds the value currently stored in the SimpleNumber to the given power of 10, which can be before or after the decimal separator.
|
|
void | setMaximumIntegerDigits (uint32_t maximumIntegerDigits, UErrorCode &status) |
| Sets the number of integer digits to the given amount, truncating if necessary.
|
|
void | setMinimumIntegerDigits (uint32_t minimumIntegerDigits, UErrorCode &status) |
| Pads the beginning of the number with zeros up to the given minimum number of integer digits.
|
|
void | setMinimumFractionDigits (uint32_t minimumFractionDigits, UErrorCode &status) |
| Pads the end of the number with zeros up to the given minimum number of fraction digits.
|
|
void | setSign (USimpleNumberSign sign, UErrorCode &status) |
| Sets the sign of the number: an explicit plus sign, explicit minus sign, or no sign.
|
|
| SimpleNumber ()=default |
| Creates a new, empty SimpleNumber that does not contain a value.
|
|
| ~SimpleNumber () |
| Destruct this SimpleNumber, cleaning up any memory it might own.
|
|
| SimpleNumber (SimpleNumber &&other) noexcept |
| SimpleNumber move constructor.
|
|
SimpleNumber & | operator= (SimpleNumber &&other) noexcept |
| SimpleNumber move assignment.
|
|
An input type for SimpleNumberFormatter.
This class is mutable and not intended for public subclassing. This class is movable but not copyable.
- Stable
- ICU 73
Definition at line 53 of file simplenumberformatter.h.
◆ SimpleNumber() [1/2]
icu::number::SimpleNumber::SimpleNumber |
( |
| ) |
|
|
default |
◆ ~SimpleNumber()
icu::number::SimpleNumber::~SimpleNumber |
( |
| ) |
|
|
inline |
◆ SimpleNumber() [2/2]
icu::number::SimpleNumber::SimpleNumber |
( |
SimpleNumber && | other | ) |
|
|
inlinenoexcept |
◆ forInt64()
◆ multiplyByPowerOfTen()
void icu::number::SimpleNumber::multiplyByPowerOfTen |
( |
int32_t | power, |
|
|
UErrorCode & | status ) |
Changes the value of the SimpleNumber by a power of 10.
This function immediately mutates the inner value.
- Stable
- ICU 73
◆ operator=()
◆ roundTo()
Rounds the value currently stored in the SimpleNumber to the given power of 10, which can be before or after the decimal separator.
This function does not change minimum integer digits.
- Stable
- ICU 73
◆ setMaximumIntegerDigits()
void icu::number::SimpleNumber::setMaximumIntegerDigits |
( |
uint32_t | maximumIntegerDigits, |
|
|
UErrorCode & | status ) |
Sets the number of integer digits to the given amount, truncating if necessary.
- Draft
- This API may be changed in the future versions and was introduced in ICU 75
◆ setMinimumFractionDigits()
void icu::number::SimpleNumber::setMinimumFractionDigits |
( |
uint32_t | minimumFractionDigits, |
|
|
UErrorCode & | status ) |
Pads the end of the number with zeros up to the given minimum number of fraction digits.
- Stable
- ICU 73
◆ setMinimumIntegerDigits()
void icu::number::SimpleNumber::setMinimumIntegerDigits |
( |
uint32_t | minimumIntegerDigits, |
|
|
UErrorCode & | status ) |
Pads the beginning of the number with zeros up to the given minimum number of integer digits.
- Stable
- ICU 73
◆ setSign()
Sets the sign of the number: an explicit plus sign, explicit minus sign, or no sign.
This setting is applied upon formatting the number.
NOTE: This does not support accounting sign notation.
- Stable
- ICU 73
◆ icu::SimpleDateFormat
◆ SimpleNumberFormatter
The documentation for this class was generated from the following file: