]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/unicode/uplrule.h
2 ******************************************************************************
3 * Copyright (C) 2010-2011 Apple Inc. All Rights Reserved.
4 ******************************************************************************
10 #include "unicode/utypes.h"
12 #if !UCONFIG_NO_FORMATTING
14 #include "unicode/upluralrules.h"
17 * NOTE - THE TEMPORARY APPLE INTERFACES DECLARED HERE ARE OBSOLETE, PLEASE USE
18 * THE REAL ICU EQUIVALENTS IN upluralrules.h
22 * A UPluralRules object for use in C programs.
23 * struct UPluralRules; defined in upluralrules.h
27 * Open a new UPluralRules object using the predefined plural rules for a
29 * @param locale The locale for which the rules are desired.
30 * @param status A pointer to a UErrorCode to receive any errors.
31 * @return A UPluralRules for the specified locale, or 0 if an error occurred.
32 * @internal/obsolete, use uplrules_open in upluralrules.h
34 U_INTERNAL UPluralRules
* U_EXPORT2
35 uplrule_open(const char *locale
,
39 * Close a UPluralRules object. Once closed it may no longer be used.
40 * @param plrules The UPluralRules object to close.
41 * @internal/obsolete, use uplrules_close in upluralrules.h
43 U_INTERNAL
void U_EXPORT2
44 uplrule_close(UPluralRules
*plrules
);
47 * Given an int32_t number, returns the keyword of the first rule that
48 * applies to the number, according to the supplied UPluralRules object.
49 * @param plrules The UPluralRules object specifying the rules.
50 * @param number The number for which the rule has to be determined.
51 * @param keyword The keyword of the rule that applies to number.
52 * @param capacity The capacity of keyword.
53 * @param status A pointer to a UErrorCode to receive any errors.
54 * @return The length of keyword.
55 * @internal/obsolete, use uplrules_select in upluralrules.h
57 U_INTERNAL
int32_t U_EXPORT2
58 uplrule_select(const UPluralRules
*plrules
,
60 UChar
*keyword
, int32_t capacity
,
64 * Given a double number, returns the keyword of the first rule that
65 * applies to the number, according to the supplied UPluralRules object.
66 * @param plrules The UPluralRules object specifying the rules.
67 * @param number The number for which the rule has to be determined.
68 * @param keyword The keyword of the rule that applies to number.
69 * @param capacity The capacity of keyword.
70 * @param status A pointer to a UErrorCode to receive any errors.
71 * @return The length of keyword.
72 * @internal/obsolete, use uplrules_select in upluralrules.h
74 U_INTERNAL
int32_t U_EXPORT2
75 uplrule_selectDouble(const UPluralRules
*plrules
,
77 UChar
*keyword
, int32_t capacity
,
80 #endif /* #if !UCONFIG_NO_FORMATTING */