unumberoptions.h
Go to the documentation of this file.
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
#ifndef __UNUMBEROPTIONS_H__
#define __UNUMBEROPTIONS_H__
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
typedef enum UNumberFormatRoundingMode {
UNUM_ROUND_CEILING,
UNUM_ROUND_FLOOR,
UNUM_ROUND_DOWN,
UNUM_ROUND_UP,
UNUM_ROUND_HALFEVEN,
#ifndef U_HIDE_DEPRECATED_API
UNUM_FOUND_HALFEVEN = UNUM_ROUND_HALFEVEN,
#endif /* U_HIDE_DEPRECATED_API */
UNUM_ROUND_HALFDOWN = UNUM_ROUND_HALFEVEN + 1,
UNUM_ROUND_HALFUP,
UNUM_ROUND_UNNECESSARY,
UNUM_ROUND_HALF_ODD,
UNUM_ROUND_HALF_CEILING,
UNUM_ROUND_HALF_FLOOR,
} UNumberFormatRoundingMode;
typedef enum UNumberGroupingStrategy {
UNUM_GROUPING_OFF,
UNUM_GROUPING_MIN2,
UNUM_GROUPING_AUTO,
UNUM_GROUPING_ON_ALIGNED,
UNUM_GROUPING_THOUSANDS
#ifndef U_HIDE_INTERNAL_API
,
UNUM_GROUPING_COUNT
#endif /* U_HIDE_INTERNAL_API */
} UNumberGroupingStrategy;
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif //__UNUMBEROPTIONS_H__
UNumberFormatRoundingMode
UNumberFormatRoundingMode
The possible number format rounding modes.
Definition unumberoptions.h:28
UNUM_ROUND_UNNECESSARY
@ UNUM_ROUND_UNNECESSARY
ROUND_UNNECESSARY reports an error if formatted result is not exact.
Definition unumberoptions.h:51
UNUM_ROUND_HALFEVEN
@ UNUM_ROUND_HALFEVEN
Half-even rounding.
Definition unumberoptions.h:37
UNUM_ROUND_HALF_ODD
@ UNUM_ROUND_HALF_ODD
Rounds ties toward the odd number.
Definition unumberoptions.h:56
UNUM_FOUND_HALFEVEN
@ UNUM_FOUND_HALFEVEN
Half-even rounding, misspelled name.
Definition unumberoptions.h:43
UNUM_ROUND_HALF_FLOOR
@ UNUM_ROUND_HALF_FLOOR
Rounds ties toward -∞.
Definition unumberoptions.h:66
UNUM_ROUND_HALF_CEILING
@ UNUM_ROUND_HALF_CEILING
Rounds ties toward +∞.
Definition unumberoptions.h:61
UNumberGroupingStrategy
UNumberGroupingStrategy
An enum declaring the strategy for when and how to display grouping separators (i....
Definition unumberoptions.h:96
UNUM_GROUPING_THOUSANDS
@ UNUM_GROUPING_THOUSANDS
Use the Western defaults: groups of 3 and enabled for all numbers 1000 or greater.
Definition unumberoptions.h:157
UNUM_GROUPING_MIN2
@ UNUM_GROUPING_MIN2
Display grouping using locale defaults, except do not show grouping on values smaller than 10000 (suc...
Definition unumberoptions.h:118
UNUM_GROUPING_ON_ALIGNED
@ UNUM_GROUPING_ON_ALIGNED
Always display the grouping separator on values of at least 1000.
Definition unumberoptions.h:149
UNUM_GROUPING_AUTO
@ UNUM_GROUPING_AUTO
Display grouping using the default strategy for all locales.
Definition unumberoptions.h:133
UNUM_GROUPING_OFF
@ UNUM_GROUPING_OFF
Do not display grouping separators in any locale.
Definition unumberoptions.h:102
UNUM_GROUPING_COUNT
@ UNUM_GROUPING_COUNT
One more than the highest UNumberGroupingStrategy value.
Definition unumberoptions.h:166
utypes.h
Basic definitions for ICU, for both C and C++ APIs.