diff options
Diffstat (limited to 'deps/icu-small/source/i18n/unicode/unum.h')
-rw-r--r-- | deps/icu-small/source/i18n/unicode/unum.h | 57 |
1 files changed, 38 insertions, 19 deletions
diff --git a/deps/icu-small/source/i18n/unicode/unum.h b/deps/icu-small/source/i18n/unicode/unum.h index 8b76014b16..c03131f372 100644 --- a/deps/icu-small/source/i18n/unicode/unum.h +++ b/deps/icu-small/source/i18n/unicode/unum.h @@ -375,12 +375,19 @@ typedef enum UNumberFormatFields { UNUM_PERMILL_FIELD, /** @stable ICU 49 */ UNUM_SIGN_FIELD, +#ifndef U_HIDE_DRAFT_API + /** @draft ICU 64 */ + UNUM_MEASURE_UNIT_FIELD, + /** @draft ICU 64 */ + UNUM_COMPACT_FIELD, +#endif /* U_HIDE_DRAFT_API */ + #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal UNumberFormatFields value. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - UNUM_FIELD_COUNT + UNUM_FIELD_COUNT = UNUM_SIGN_FIELD + 3 #endif /* U_HIDE_DEPRECATED_API */ } UNumberFormatFields; @@ -1022,16 +1029,18 @@ typedef enum UNumberFormatAttribute { * * @stable ICU 51 */ UNUM_SCALE = 21, -#ifndef U_HIDE_INTERNAL_API + +#ifndef U_HIDE_DRAFT_API /** - * Minimum grouping digits, technology preview. + * Minimum grouping digits; most commonly set to 2 to print "1000" instead of "1,000". * See DecimalFormat::getMinimumGroupingDigits(). * - * @internal technology preview + * For better control over grouping strategies, use UNumberFormatter. + * + * @draft ICU 64 */ UNUM_MINIMUM_GROUPING_DIGITS = 22, - /* TODO: test C API when it becomes @draft */ -#endif /* U_HIDE_INTERNAL_API */ +#endif /* U_HIDE_DRAFT_API */ /** * if this attribute is set to 0, it is set to UNUM_CURRENCY_STANDARD purpose, @@ -1041,11 +1050,12 @@ typedef enum UNumberFormatAttribute { */ UNUM_CURRENCY_USAGE = 23, - /* The following cannot be #ifndef U_HIDE_INTERNAL_API, needed in .h file variable declararions */ +#ifndef U_HIDE_INTERNAL_API /** One below the first bitfield-boolean item. * All items after this one are stored in boolean form. * @internal */ UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 0x0FFF, +#endif /* U_HIDE_INTERNAL_API */ /** If 1, specifies that if setting the "max integer digits" attribute would truncate a value, set an error status rather than silently truncating. * For example, formatting the value 1234 with 4 max int digits would succeed, but formatting 12345 would fail. There is no effect on parsing. @@ -1071,24 +1081,33 @@ typedef enum UNumberFormatAttribute { */ UNUM_PARSE_DECIMAL_MARK_REQUIRED = 0x1002, - /* The following cannot be #ifndef U_HIDE_INTERNAL_API, needed in .h file variable declararions */ - /** Limit of boolean attributes. - * @internal */ - UNUM_LIMIT_BOOLEAN_ATTRIBUTE = 0x1003, +#ifndef U_HIDE_DRAFT_API /** - * Whether parsing is sensitive to case (lowercase/uppercase). - * TODO: Add to the test suite. - * @internal This API is a technical preview. It may change in an upcoming release. + * Parsing: if set to 1, parsing is sensitive to case (lowercase/uppercase). + * + * @draft ICU 64 */ - UNUM_PARSE_CASE_SENSITIVE = 0x1004, + UNUM_PARSE_CASE_SENSITIVE = 0x1003, /** - * Formatting: whether to show the plus sign on non-negative numbers. - * TODO: Add to the test suite. - * @internal This API is a technical preview. It may change in an upcoming release. + * Formatting: if set to 1, whether to show the plus sign on non-negative numbers. + * + * For better control over sign display, use UNumberFormatter. + * + * @draft ICU 64 */ - UNUM_SIGN_ALWAYS_SHOWN = 0x1005, + UNUM_SIGN_ALWAYS_SHOWN = 0x1004, + +#endif /* U_HIDE_DRAFT_API */ + +#ifndef U_HIDE_INTERNAL_API + /** Limit of boolean attributes. (value should + * not depend on U_HIDE conditionals) + * @internal */ + UNUM_LIMIT_BOOLEAN_ATTRIBUTE = 0x1005, +#endif /* U_HIDE_INTERNAL_API */ + } UNumberFormatAttribute; /** |