]> granicus.if.org Git - icu/commitdiff
add getOutputUnit to FormattedNumber
authorYounies Mahmoud <younies.mahmoud@gmail.com>
Wed, 18 Mar 2020 12:52:21 +0000 (13:52 +0100)
committerYounies Mahmoud <younies.mahmoud@gmail.com>
Wed, 18 Mar 2020 12:52:21 +0000 (13:52 +0100)
icu4c/source/i18n/unicode/numberformatter.h

index e4740055fd05df7cfa07e1e3b8b7e8f4f73ecbc1..5450eaf4669a6ac1b5afa0c9708dd7e77a123a7d 100644 (file)
@@ -2541,6 +2541,14 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
     /** @copydoc FormattedValue::nextPosition() */
     UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
 
+    /**
+     * Gets the resolved output unit.
+     *
+     * @return `MeasureUnit`.
+     * @draft ICU 67
+     */
+    MeasureUnit getOutputUnit(UErrorCode& status) const;
+
 #ifndef U_HIDE_DRAFT_API
     /**
      * Determines the start (inclusive) and end (exclusive) indices of the next occurrence of the given