|
ICU 78.1
78.1
|
A NumberRangeFormatter that has a locale associated with it; this means .formatRange() methods are available. More...
#include <numberrangeformatter.h>
Friends | |
| class | NumberRangeFormatterSettings< UnlocalizedNumberRangeFormatter > |
| class | NumberRangeFormatterSettings< LocalizedNumberRangeFormatter > |
| class | UnlocalizedNumberRangeFormatter |
A NumberRangeFormatter that has a locale associated with it; this means .formatRange() methods are available.
Instances of this class are immutable and thread-safe.
Definition at line 471 of file numberrangeformatter.h.
|
default |
Default constructor: puts the formatter into a valid but undefined state.
| U_I18N_API icu::number::LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter | ( | const LocalizedNumberRangeFormatter & | other | ) |
Returns a copy of this LocalizedNumberRangeFormatter.
|
noexcept |
Move constructor: The source LocalizedNumberRangeFormatter will be left in a valid but undefined state.
| U_I18N_API icu::number::LocalizedNumberRangeFormatter::~LocalizedNumberRangeFormatter | ( | ) |
Destruct this LocalizedNumberRangeFormatter, cleaning up any memory it might own.
| U_I18N_API FormattedNumberRange icu::number::LocalizedNumberRangeFormatter::formatFormattableRange | ( | const Formattable & | first, |
| const Formattable & | second, | ||
| UErrorCode & | status | ||
| ) | const |
Format the given Formattables to a string using the settings specified in the NumberRangeFormatter fluent setting chain.
| first | The first number in the range, usually to the left in LTR locales. |
| second | The second number in the range, usually to the right in LTR locales. |
| status | Set if an error occurs while formatting. |
| U_I18N_API void icu::number::LocalizedNumberRangeFormatter::formatImpl | ( | impl::UFormattedNumberRangeData & | results, |
| bool | equalBeforeRounding, | ||
| UErrorCode & | status | ||
| ) | const |
| results | The results object. This method will mutate it to save the results. |
| equalBeforeRounding | Whether the number was equal before copying it into a DecimalQuantity. Used for determining the identity fallback behavior. |
| status | Set if an error occurs while formatting. |
| U_I18N_API LocalizedNumberRangeFormatter& icu::number::LocalizedNumberRangeFormatter::operator= | ( | const LocalizedNumberRangeFormatter & | other | ) |
Copy assignment operator.
|
noexcept |
Move assignment operator: The source LocalizedNumberRangeFormatter will be left in a valid but undefined state.
| U_I18N_API UnlocalizedNumberRangeFormatter icu::number::LocalizedNumberRangeFormatter::withoutLocale | ( | ) | && |
Overload of withoutLocale() for use on an rvalue reference.
| U_I18N_API UnlocalizedNumberRangeFormatter icu::number::LocalizedNumberRangeFormatter::withoutLocale | ( | ) | const & |