PNG  IHDR pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_F@8N ' p @8N@8}' p '#@8N@8N pQ9p!i~}|6-ӪG` VP.@*j>[ K^<֐Z]@8N'KQ<Q(`s" 'hgpKB`R@Dqj '  'P$a ( `D$Na L?u80e J,K˷NI'0eݷ(NI'؀ 2ipIIKp`:O'`ʤxB8Ѥx Ѥx $ $P6 :vRNb 'p,>NB 'P]-->P T+*^h& p '‰a ‰ (ĵt#u33;Nt̵'ޯ; [3W ~]0KH1q@8]O2]3*̧7# *p>us p _6]/}-4|t'|Smx= DoʾM×M_8!)6lq':l7!|4} '\ne t!=hnLn (~Dn\+‰_4k)0e@OhZ`F `.m1} 'vp{F`ON7Srx 'D˸nV`><;yMx!IS钦OM)Ե٥x 'DSD6bS8!" ODz#R >S8!7ّxEh0m$MIPHi$IvS8IN$I p$O8I,sk&I)$IN$Hi$I^Ah.p$MIN$IR8I·N "IF9Ah0m$MIN$IR8IN$I 3jIU;kO$ɳN$+ q.x* tEXtComment

Viewing File: /opt/alt/alt-nodejs18/root/usr/share/doc/alt-nodejs18-libicu-doc/upluralrules_8h.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ICU 74.2: i18n/unicode/upluralrules.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ICU 74.2
   &#160;<span id="projectnumber">74.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_73bc6a9bb617ea1bc89a10aa59ce84e4.html">i18n</a></li><li class="navelem"><a class="el" href="dir_0119ce638985e8a1561a00fdb5f76ff6.html">unicode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">upluralrules.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>C API: Plural rules, select plural keywords for numeric values.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="uenum_8h_source.html">unicode/uenum.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="unum_8h_source.html">unicode/unum.h</a>&quot;</code><br />
</div>
<p><a href="upluralrules_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceicu"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceicu.html">icu</a></td></tr>
<tr class="memdesc:namespaceicu"><td class="mdescLeft">&#160;</td><td class="mdescRight">File <a class="el" href="coll_8h.html" title="C++ API: Collation Service.">coll.h</a>. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ae51c4d4f471dc5d984e8fde4b5a2cfdc"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3c">UPluralType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#ae51c4d4f471dc5d984e8fde4b5a2cfdc">UPluralType</a></td></tr>
<tr class="separator:ae51c4d4f471dc5d984e8fde4b5a2cfdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fe07aecf6dfa5353e77be6c78e1ff36"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a></td></tr>
<tr class="memdesc:a6fe07aecf6dfa5353e77be6c78e1ff36"><td class="mdescLeft">&#160;</td><td class="mdescRight">C typedef for struct UPluralRules.  <a href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">More...</a><br /></td></tr>
<tr class="separator:a6fe07aecf6dfa5353e77be6c78e1ff36"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:afceec9f2dee10dbf3ca0d694f66d5d3c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3c">UPluralType</a> { <a class="el" href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3ca5c9970165fa5b953848d6a055061eb07">UPLURAL_TYPE_CARDINAL</a>
, <a class="el" href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3ca5202122d3a4e2ad72d21879a7262aed0">UPLURAL_TYPE_ORDINAL</a>
, <a class="el" href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3ca94bf640d740f7669175139a6b0978adc">UPLURAL_TYPE_COUNT</a>
 }</td></tr>
<tr class="memdesc:afceec9f2dee10dbf3ca0d694f66d5d3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of plurals and PluralRules.  <a href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3c">More...</a><br /></td></tr>
<tr class="separator:afceec9f2dee10dbf3ca0d694f66d5d3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a4e5c1dcd5f3d91f6850affaa860ab233"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#a4e5c1dcd5f3d91f6850affaa860ab233">uplrules_open</a> (const char *locale, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a4e5c1dcd5f3d91f6850affaa860ab233"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens a new UPluralRules object using the predefined cardinal-number plural rules for a given locale.  <a href="upluralrules_8h.html#a4e5c1dcd5f3d91f6850affaa860ab233">More...</a><br /></td></tr>
<tr class="separator:a4e5c1dcd5f3d91f6850affaa860ab233"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22e0e0996d812efdc493210bfe28552f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#a22e0e0996d812efdc493210bfe28552f">uplrules_openForType</a> (const char *locale, <a class="el" href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3c">UPluralType</a> type, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a22e0e0996d812efdc493210bfe28552f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens a new UPluralRules object using the predefined plural rules for a given locale and the plural type.  <a href="upluralrules_8h.html#a22e0e0996d812efdc493210bfe28552f">More...</a><br /></td></tr>
<tr class="separator:a22e0e0996d812efdc493210bfe28552f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95ea1dbcad91db8c2f3365f1f887e38a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#a95ea1dbcad91db8c2f3365f1f887e38a">uplrules_close</a> (<a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *uplrules)</td></tr>
<tr class="memdesc:a95ea1dbcad91db8c2f3365f1f887e38a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes a UPluralRules object.  <a href="upluralrules_8h.html#a95ea1dbcad91db8c2f3365f1f887e38a">More...</a><br /></td></tr>
<tr class="separator:a95ea1dbcad91db8c2f3365f1f887e38a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d8ba1623ef7ded96bf162b4966436ac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#a9d8ba1623ef7ded96bf162b4966436ac">uplrules_select</a> (const <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *uplrules, double number, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *keyword, int32_t capacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a9d8ba1623ef7ded96bf162b4966436ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a floating-point number, returns the keyword of the first rule that applies to the number, according to the supplied UPluralRules object.  <a href="upluralrules_8h.html#a9d8ba1623ef7ded96bf162b4966436ac">More...</a><br /></td></tr>
<tr class="separator:a9d8ba1623ef7ded96bf162b4966436ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a965fbba8d169816d66a449b4a64f5d0f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#a965fbba8d169816d66a449b4a64f5d0f">uplrules_selectFormatted</a> (const <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *uplrules, const struct <a class="el" href="uformattednumber_8h.html#a9d4030bdc4dd1ec4de828bf1bcf4b1b6">UFormattedNumber</a> *number, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *keyword, int32_t capacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a965fbba8d169816d66a449b4a64f5d0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a formatted number, returns the keyword of the first rule that applies to the number, according to the supplied UPluralRules object.  <a href="upluralrules_8h.html#a965fbba8d169816d66a449b4a64f5d0f">More...</a><br /></td></tr>
<tr class="separator:a965fbba8d169816d66a449b4a64f5d0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f4b0af98562f8feaa45c2d4058212c4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#a5f4b0af98562f8feaa45c2d4058212c4">uplrules_selectForRange</a> (const <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *uplrules, const struct <a class="el" href="unumberrangeformatter_8h.html#ab8e7caf895d25d3feb314040d1ac6146">UFormattedNumberRange</a> *urange, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *keyword, int32_t capacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a5f4b0af98562f8feaa45c2d4058212c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a formatted number range, returns the overall plural form of the range.  <a href="upluralrules_8h.html#a5f4b0af98562f8feaa45c2d4058212c4">More...</a><br /></td></tr>
<tr class="separator:a5f4b0af98562f8feaa45c2d4058212c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe6b54b1c98191bd493b04210422efa8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#abe6b54b1c98191bd493b04210422efa8">uplrules_selectWithFormat</a> (const <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *uplrules, double number, const <a class="el" href="unum_8h.html#aaeec8f4d21895a6f3efdedf14e8f946b">UNumberFormat</a> *fmt, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *keyword, int32_t capacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:abe6b54b1c98191bd493b04210422efa8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a number, returns the keyword of the first rule that applies to the number, according to the UPluralRules object and given the number format specified by the UNumberFormat object.  <a href="upluralrules_8h.html#abe6b54b1c98191bd493b04210422efa8">More...</a><br /></td></tr>
<tr class="separator:abe6b54b1c98191bd493b04210422efa8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f8a89ec2b58323e9f96ac0bf2c13ab5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> <a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="upluralrules_8h.html#a5f8a89ec2b58323e9f96ac0bf2c13ab5">uplrules_getKeywords</a> (const <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *uplrules, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a5f8a89ec2b58323e9f96ac0bf2c13ab5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a string enumeration of all plural rule keywords used in this UPluralRules object.  <a href="upluralrules_8h.html#a5f8a89ec2b58323e9f96ac0bf2c13ab5">More...</a><br /></td></tr>
<tr class="separator:a5f8a89ec2b58323e9f96ac0bf2c13ab5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>C API: Plural rules, select plural keywords for numeric values. </p>
<p>A UPluralRules object defines rules for mapping non-negative numeric values onto a small set of keywords. Rules are constructed from a text description, consisting of a series of keywords and conditions. The uplrules_select function examines each condition in order and returns the keyword for the first condition that matches the number. If none match, the default rule(other) is returned.</p>
<p>For more information, see the LDML spec, Part 3.5 Language Plural Rules: <a href="https://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules">https://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules</a></p>
<p>Keywords: ICU locale data has 6 predefined values - 'zero', 'one', 'two', 'few', 'many' and 'other'. Callers need to check the value of keyword returned by the uplrules_select function.</p>
<p>These are based on CLDR <em>Language Plural Rules</em>. For these predefined rules, see the CLDR page at <a href="https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html">https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html</a> </p>

<p class="definition">Definition in file <a class="el" href="upluralrules_8h_source.html">upluralrules.h</a>.</p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a6fe07aecf6dfa5353e77be6c78e1ff36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fe07aecf6dfa5353e77be6c78e1ff36">&#9670;&nbsp;</a></span>UPluralRules</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>C typedef for struct UPluralRules. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006682">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

<p class="definition">Definition at line <a class="el" href="upluralrules_8h_source.html#l00001">1</a> of file <a class="el" href="upluralrules_8h_source.html">upluralrules.h</a>.</p>

</div>
</div>
<a id="ae51c4d4f471dc5d984e8fde4b5a2cfdc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae51c4d4f471dc5d984e8fde4b5a2cfdc">&#9670;&nbsp;</a></span>UPluralType</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3c">UPluralType</a> <a class="el" href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3c">UPluralType</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006680">Stable:</a></b></dt><dd>ICU 50 </dd></dl>

<p class="definition">Definition at line <a class="el" href="upluralrules_8h_source.html#l00001">1</a> of file <a class="el" href="upluralrules_8h_source.html">upluralrules.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="afceec9f2dee10dbf3ca0d694f66d5d3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afceec9f2dee10dbf3ca0d694f66d5d3c">&#9670;&nbsp;</a></span>UPluralType</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3c">UPluralType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Type of plurals and PluralRules. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006679">Stable:</a></b></dt><dd>ICU 50 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="afceec9f2dee10dbf3ca0d694f66d5d3ca5c9970165fa5b953848d6a055061eb07"></a>UPLURAL_TYPE_CARDINAL&#160;</td><td class="fielddoc"><p>Plural rules for cardinal numbers: 1 file vs. </p>
<p>2 files. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable006690">Stable:</a></b></dt><dd>ICU 50 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="afceec9f2dee10dbf3ca0d694f66d5d3ca5202122d3a4e2ad72d21879a7262aed0"></a>UPLURAL_TYPE_ORDINAL&#160;</td><td class="fielddoc"><p>Plural rules for ordinal numbers: 1st file, 2nd file, 3rd file, 4th file, etc. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006691">Stable:</a></b></dt><dd>ICU 50 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="afceec9f2dee10dbf3ca0d694f66d5d3ca94bf640d740f7669175139a6b0978adc"></a>UPLURAL_TYPE_COUNT&#160;</td><td class="fielddoc"><p>One more than the highest normal UPluralType value. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000428">Deprecated:</a></b></dt><dd>ICU 58 The numeric value may change over time, see ICU ticket #12420. </dd></dl>
</td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="upluralrules_8h_source.html#l00059">59</a> of file <a class="el" href="upluralrules_8h_source.html">upluralrules.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a95ea1dbcad91db8c2f3365f1f887e38a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a95ea1dbcad91db8c2f3365f1f887e38a">&#9670;&nbsp;</a></span>uplrules_close()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> void uplrules_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *&#160;</td>
          <td class="paramname"><em>uplrules</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Closes a UPluralRules object. </p>
<p>Once closed it may no longer be used. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uplrules</td><td>The UPluralRules object to close. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006685">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

</div>
</div>
<a id="a5f8a89ec2b58323e9f96ac0bf2c13ab5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f8a89ec2b58323e9f96ac0bf2c13ab5">&#9670;&nbsp;</a></span>uplrules_getKeywords()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> <a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a>* uplrules_getKeywords </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *&#160;</td>
          <td class="paramname"><em>uplrules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a string enumeration of all plural rule keywords used in this UPluralRules object. </p>
<p>The rule "other" is always present by default. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uplrules</td><td>The UPluralRules object specifying the rules for a given locale. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a string enumeration over plural rule keywords, or NULL upon error. The caller is responsible for closing the result. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006689">Stable:</a></b></dt><dd>ICU 59 </dd></dl>

</div>
</div>
<a id="a4e5c1dcd5f3d91f6850affaa860ab233"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e5c1dcd5f3d91f6850affaa860ab233">&#9670;&nbsp;</a></span>uplrules_open()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a>* uplrules_open </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens a new UPluralRules object using the predefined cardinal-number plural rules for a given locale. </p>
<p>Same as uplrules_openForType(locale, UPLURAL_TYPE_CARDINAL, status). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">locale</td><td>The locale for which the rules are desired. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A UPluralRules for the specified locale, or NULL if an error occurred. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006683">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

</div>
</div>
<a id="a22e0e0996d812efdc493210bfe28552f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22e0e0996d812efdc493210bfe28552f">&#9670;&nbsp;</a></span>uplrules_openForType()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a>* uplrules_openForType </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="upluralrules_8h.html#afceec9f2dee10dbf3ca0d694f66d5d3c">UPluralType</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens a new UPluralRules object using the predefined plural rules for a given locale and the plural type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">locale</td><td>The locale for which the rules are desired. </td></tr>
    <tr><td class="paramname">type</td><td>The plural type (e.g., cardinal or ordinal). </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A UPluralRules for the specified locale, or NULL if an error occurred. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006684">Stable:</a></b></dt><dd>ICU 50 </dd></dl>

</div>
</div>
<a id="a9d8ba1623ef7ded96bf162b4966436ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d8ba1623ef7ded96bf162b4966436ac">&#9670;&nbsp;</a></span>uplrules_select()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> int32_t uplrules_select </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *&#160;</td>
          <td class="paramname"><em>uplrules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>keyword</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>capacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Given a floating-point number, returns the keyword of the first rule that applies to the number, according to the supplied UPluralRules object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uplrules</td><td>The UPluralRules object specifying the rules. </td></tr>
    <tr><td class="paramname">number</td><td>The number for which the rule has to be determined. </td></tr>
    <tr><td class="paramname">keyword</td><td>An output buffer to write the keyword of the rule that applies to number. </td></tr>
    <tr><td class="paramname">capacity</td><td>The capacity of the keyword buffer. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the keyword. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006686">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

</div>
</div>
<a id="a965fbba8d169816d66a449b4a64f5d0f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a965fbba8d169816d66a449b4a64f5d0f">&#9670;&nbsp;</a></span>uplrules_selectFormatted()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> int32_t uplrules_selectFormatted </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *&#160;</td>
          <td class="paramname"><em>uplrules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct <a class="el" href="uformattednumber_8h.html#a9d4030bdc4dd1ec4de828bf1bcf4b1b6">UFormattedNumber</a> *&#160;</td>
          <td class="paramname"><em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>keyword</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>capacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Given a formatted number, returns the keyword of the first rule that applies to the number, according to the supplied UPluralRules object. </p>
<p>A UFormattedNumber allows you to specify an exponent or trailing zeros, which can affect the plural category. To get a UFormattedNumber, see <a class="el" href="unumberformatter_8h.html#a7c1238b2dd08f32f1ea245ece41e71bd">UNumberFormatter</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uplrules</td><td>The UPluralRules object specifying the rules. </td></tr>
    <tr><td class="paramname">number</td><td>The formatted number for which the rule has to be determined. </td></tr>
    <tr><td class="paramname">keyword</td><td>The destination buffer for the keyword of the rule that applies to the number. </td></tr>
    <tr><td class="paramname">capacity</td><td>The capacity of the keyword buffer. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the keyword. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006687">Stable:</a></b></dt><dd>ICU 64 </dd></dl>

</div>
</div>
<a id="a5f4b0af98562f8feaa45c2d4058212c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f4b0af98562f8feaa45c2d4058212c4">&#9670;&nbsp;</a></span>uplrules_selectForRange()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> int32_t uplrules_selectForRange </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *&#160;</td>
          <td class="paramname"><em>uplrules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct <a class="el" href="unumberrangeformatter_8h.html#ab8e7caf895d25d3feb314040d1ac6146">UFormattedNumberRange</a> *&#160;</td>
          <td class="paramname"><em>urange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>keyword</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>capacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Given a formatted number range, returns the overall plural form of the range. </p>
<p>For example, "3-5" returns "other" in English.</p>
<p>To get a UFormattedNumberRange, see UNumberRangeFormatter.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uplrules</td><td>The UPluralRules object specifying the rules. </td></tr>
    <tr><td class="paramname">urange</td><td>The number range onto which the rules will be applied. </td></tr>
    <tr><td class="paramname">keyword</td><td>The destination buffer for the keyword of the rule that applies to the number range. </td></tr>
    <tr><td class="paramname">capacity</td><td>The capacity of the keyword buffer. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the keyword. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable006688">Stable:</a></b></dt><dd>ICU 68 </dd></dl>

</div>
</div>
<a id="abe6b54b1c98191bd493b04210422efa8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe6b54b1c98191bd493b04210422efa8">&#9670;&nbsp;</a></span>uplrules_selectWithFormat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a676114b1a64bb7c2de15c919a00b28df">U_CAPI</a> int32_t uplrules_selectWithFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="upluralrules_8h.html#a6fe07aecf6dfa5353e77be6c78e1ff36">UPluralRules</a> *&#160;</td>
          <td class="paramname"><em>uplrules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="unum_8h.html#aaeec8f4d21895a6f3efdedf14e8f946b">UNumberFormat</a> *&#160;</td>
          <td class="paramname"><em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>keyword</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>capacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Given a number, returns the keyword of the first rule that applies to the number, according to the UPluralRules object and given the number format specified by the UNumberFormat object. </p>
<p>Note: This internal preview interface may be removed in the future if an architecturally cleaner solution reaches stable status. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uplrules</td><td>The UPluralRules object specifying the rules. </td></tr>
    <tr><td class="paramname">number</td><td>The number for which the rule has to be determined. </td></tr>
    <tr><td class="paramname">fmt</td><td>The UNumberFormat specifying how the number will be formatted (this can affect the plural form, e.g. "1 dollar" vs "1.0 dollars"). If this is NULL, the function behaves like uplrules_select. </td></tr>
    <tr><td class="paramname">keyword</td><td>An output buffer to write the keyword of the rule that applies to number. </td></tr>
    <tr><td class="paramname">capacity</td><td>The capacity of the keyword buffer. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of keyword. </dd></dl>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000558">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 59 technology preview, may be removed in the future </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
Back to Directory=ceiIENDB`