10 #ifndef UPLURALRULES_H
11 #define UPLURALRULES_H
15 #if !UCONFIG_NO_FORMATTING
19 #if U_SHOW_CPLUSPLUS_API
21 #endif // U_SHOW_CPLUSPLUS_API
23 #ifndef U_HIDE_INTERNAL_API
69 #ifndef U_HIDE_DEPRECATED_API
122 #if U_SHOW_CPLUSPLUS_API
157 UChar *keyword, int32_t capacity,
180 UChar *keyword, int32_t capacity,
183 #ifndef U_HIDE_DRAFT_API
202 UChar *keyword, int32_t capacity,
204 #endif // U_HIDE_DRAFT_API
206 #ifndef U_HIDE_INTERNAL_API
229 UChar *keyword, int32_t capacity,
#define U_CAPI
This is used to declare a function as a public ICU C API.
struct UEnumeration UEnumeration
structure representing an enumeration object instance
U_CAPI void uplrules_close(UPluralRules *uplrules)
Closes a UPluralRules object.
U_CAPI int32_t uplrules_selectForRange(const UPluralRules *uplrules, const struct UFormattedNumberRange *urange, UChar *keyword, int32_t capacity, UErrorCode *status)
Given a formatted number range, returns the overall plural form of the range.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
void * UNumberFormat
A number formatter.
Plural rules for ordinal numbers: 1st file, 2nd file, 3rd file, 4th file, etc.
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
U_CAPI UEnumeration * uplrules_getKeywords(const UPluralRules *uplrules, UErrorCode *status)
Creates a string enumeration of all plural rule keywords used in this UPluralRules object...
Plural rules for cardinal numbers: 1 file vs.
U_CAPI int32_t uplrules_selectWithFormat(const UPluralRules *uplrules, double number, const UNumberFormat *fmt, UChar *keyword, int32_t capacity, UErrorCode *status)
Given a number, returns the keyword of the first rule that applies to the number, according to the UP...
U_CAPI int32_t uplrules_select(const UPluralRules *uplrules, double number, UChar *keyword, int32_t capacity, UErrorCode *status)
Given a floating-point number, returns the keyword of the first rule that applies to the number...
U_CAPI UPluralRules * uplrules_open(const char *locale, UErrorCode *status)
Opens a new UPluralRules object using the predefined cardinal-number plural rules for a given locale...
U_CAPI UPluralRules * uplrules_openForType(const char *locale, UPluralType type, UErrorCode *status)
Opens a new UPluralRules object using the predefined plural rules for a given locale and the plural t...
char16_t UChar
The base type for UTF-16 code units and pointers.
One more than the highest normal UPluralType value.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
UPluralType
Type of plurals and PluralRules.
C API: String Enumeration.
struct UPluralRules UPluralRules
C typedef for struct UPluralRules.
Basic definitions for ICU, for both C and C++ APIs.
"Smart pointer" class, closes a UPluralRules via uplrules_close().
U_CAPI int32_t uplrules_selectFormatted(const UPluralRules *uplrules, const struct UFormattedNumber *number, UChar *keyword, int32_t capacity, UErrorCode *status)
Given a formatted number, returns the keyword of the first rule that applies to the number...
C API: Compatibility APIs for number formatting.