ICU 76.1 76.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 487 of file numberrangeformatter.h.
|
default |
Default constructor: puts the formatter into a valid but undefined state.
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.
icu::number::LocalizedNumberRangeFormatter::~LocalizedNumberRangeFormatter | ( | ) |
Destruct this LocalizedNumberRangeFormatter, cleaning up any memory it might own.
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. |
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. |
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.
UnlocalizedNumberRangeFormatter icu::number::LocalizedNumberRangeFormatter::withoutLocale | ( | ) | && |
Overload of withoutLocale() for use on an rvalue reference.
UnlocalizedNumberRangeFormatter icu::number::LocalizedNumberRangeFormatter::withoutLocale | ( | ) | const & |
Disassociate the locale from this formatter.
Definition at line 594 of file numberrangeformatter.h.
Definition at line 594 of file numberrangeformatter.h.
Definition at line 601 of file numberrangeformatter.h.