Go to the documentation of this file.
10 #ifndef UPLURALRULES_H
11 #define UPLURALRULES_H
15 #if !UCONFIG_NO_FORMATTING
19 #ifndef U_HIDE_INTERNAL_API
61 #ifndef U_HIDE_DEPRECATED_API
114 #if U_SHOW_CPLUSPLUS_API
148 UChar *keyword, int32_t capacity,
151 #ifndef U_HIDE_INTERNAL_API
173 UChar *keyword, int32_t capacity,
UPluralType
Type of plurals and PluralRules.
U_CAPI void uplrules_close(UPluralRules *uplrules)
Closes a UPluralRules object.
struct UPluralRules UPluralRules
C typedef for struct UPluralRules.
Basic definitions for ICU, for both C and C++ APIs.
@ UPLURAL_TYPE_COUNT
One more than the highest normal UPluralType value.
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...
C API: Compatibility APIs for number formatting.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
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...
#define U_INTERNAL
This is used to declare a function as an internal ICU C API
@ UPLURAL_TYPE_CARDINAL
Plural rules for cardinal numbers: 1 file vs.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
void * UNumberFormat
A number formatter.
UEnumeration * uplrules_getKeywords(const UPluralRules *uplrules, UErrorCode *status)
Creates a string enumeration of all plural rule keywords used in this UPluralRules object.
U_CAPI int32_t uplrules_select(const UPluralRules *uplrules, double number, 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 su...
struct UEnumeration UEnumeration
structure representing an enumeration object instance
@ UPLURAL_TYPE_ORDINAL
Plural rules for ordinal numbers: 1st file, 2nd file, 3rd file, 4th file, etc.
#define U_CAPI
This is used to declare a function as a public ICU C API.
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.
#define U_NAMESPACE_BEGIN
C API: String Enumeration.