Add additional methods to make LN[R]F friendlier

Description

Frank said:

I found out that we have public default constructor for FormattedNumber

https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1number_1_1FormattedNumber.html

But we do not have public default constructor for FormattedNumberRange

https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1number_1_1FormattedNumberRange.html

And also:

LocalizedNumberFormatter (not the range one) has 3 public format method

FormattedNumber formatInt(int64_t value, UErrorCode &status) const;
FormattedNumber formatDouble(double value, UErrorCode &status) const;
FormattedNumber formatDecimal(StringPiece value, UErrorCode& status) const;

I am currently using the formatDouble and formatDecimal (for bigint)

and LocalizedNumberRangeFormatter has 1 public method

FormattedNumberRange formatFormattableRange (const Formattable &first, const Formattable &second, UErrorCode &status) const

I propose that we add format methods to both classes to increase parity, as well as the default constructor on LNRF.

Assignee

Shane Carr

Reporter

Shane Carr

Components

Labels

None

Reviewer

None

Priority

medium

Time Needed

Hours

Fix versions

Configure