Файловый менеджер - Редактировать - /opt/alt/alt-nodejs20/root/usr/share/doc/alt-nodejs20-libicu-doc/upluralrules_8h.html
Назад
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.8.14"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>ICU 78.3: 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="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.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 78.3  <span id="projectnumber">78.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.14 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @license-end */ </script> <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&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); /* @license-end */</script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </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> | <a href="#typedef-members">Typedefs</a> | <a href="#enum-members">Enumerations</a> | <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 "<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>"</code><br /> <code>#include "<a class="el" href="uenum_8h_source.html">unicode/uenum.h</a>"</code><br /> <code>#include "<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>"</code><br /> <code>#include "<a class="el" href="unum_8h_source.html">unicode/unum.h</a>"</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">  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceicu.html">icu</a></td></tr> <tr class="memdesc:namespaceicu"><td class="mdescLeft"> </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"> </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> </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"> </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> </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"> </td><td class="mdescRight">C typedef for struct UPluralRules. <a href="#a6fe07aecf6dfa5353e77be6c78e1ff36">More...</a><br /></td></tr> <tr class="separator:a6fe07aecf6dfa5353e77be6c78e1ff36"><td class="memSeparator" colspan="2"> </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  </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"> </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"> </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> * </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"> </td><td class="mdescRight">Opens a new UPluralRules object using the predefined cardinal-number plural rules for a given locale. <a href="#a4e5c1dcd5f3d91f6850affaa860ab233">More...</a><br /></td></tr> <tr class="separator:a4e5c1dcd5f3d91f6850affaa860ab233"><td class="memSeparator" colspan="2"> </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> * </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"> </td><td class="mdescRight">Opens a new UPluralRules object using the predefined plural rules for a given locale and the plural type. <a href="#a22e0e0996d812efdc493210bfe28552f">More...</a><br /></td></tr> <tr class="separator:a22e0e0996d812efdc493210bfe28552f"><td class="memSeparator" colspan="2"> </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 </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"> </td><td class="mdescRight">Closes a UPluralRules object. <a href="#a95ea1dbcad91db8c2f3365f1f887e38a">More...</a><br /></td></tr> <tr class="separator:a95ea1dbcad91db8c2f3365f1f887e38a"><td class="memSeparator" colspan="2"> </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 </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"> </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="#a9d8ba1623ef7ded96bf162b4966436ac">More...</a><br /></td></tr> <tr class="separator:a9d8ba1623ef7ded96bf162b4966436ac"><td class="memSeparator" colspan="2"> </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 </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"> </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="#a965fbba8d169816d66a449b4a64f5d0f">More...</a><br /></td></tr> <tr class="separator:a965fbba8d169816d66a449b4a64f5d0f"><td class="memSeparator" colspan="2"> </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 </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"> </td><td class="mdescRight">Given a formatted number range, returns the overall plural form of the range. <a href="#a5f4b0af98562f8feaa45c2d4058212c4">More...</a><br /></td></tr> <tr class="separator:a5f4b0af98562f8feaa45c2d4058212c4"><td class="memSeparator" colspan="2"> </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 </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"> </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="#abe6b54b1c98191bd493b04210422efa8">More...</a><br /></td></tr> <tr class="separator:abe6b54b1c98191bd493b04210422efa8"><td class="memSeparator" colspan="2"> </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> * </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"> </td><td class="mdescRight">Creates a string enumeration of all plural rule keywords used in this UPluralRules object. <a href="#a5f8a89ec2b58323e9f96ac0bf2c13ab5">More...</a><br /></td></tr> <tr class="separator:a5f8a89ec2b58323e9f96ac0bf2c13ab5"><td class="memSeparator" colspan="2"> </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">◆ </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#_stable006904">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> <p class="definition">Definition at line <a class="el" href="upluralrules_8h_source.html#l00088">88</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">◆ </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#_stable006902">Stable:</a></b></dt><dd>ICU 50 </dd></dl> <p class="definition">Definition at line <a class="el" href="upluralrules_8h_source.html#l00081">81</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">◆ </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#_stable006901">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 </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#_stable006912">Stable:</a></b></dt><dd>ICU 50 </dd></dl> </td></tr> <tr><td class="fieldname"><a id="afceec9f2dee10dbf3ca0d694f66d5d3ca5202122d3a4e2ad72d21879a7262aed0"></a>UPLURAL_TYPE_ORDINAL </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#_stable006913">Stable:</a></b></dt><dd>ICU 50 </dd></dl> </td></tr> <tr><td class="fieldname"><a id="afceec9f2dee10dbf3ca0d694f66d5d3ca94bf640d740f7669175139a6b0978adc"></a>UPLURAL_TYPE_COUNT </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#_deprecated000760">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">◆ </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> * </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#_stable006907">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">◆ </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> * </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> * </td> <td class="paramname"><em>status</em> </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#_stable006911">Stable:</a></b></dt><dd>ICU 59 </dd></dl> </div> </div> <a id="a4e5c1dcd5f3d91f6850affaa860ab233"></a> <h2 class="memtitle"><span class="permalink"><a href="#a4e5c1dcd5f3d91f6850affaa860ab233">◆ </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 * </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> * </td> <td class="paramname"><em>status</em> </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#_stable006905">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">◆ </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 * </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> </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> * </td> <td class="paramname"><em>status</em> </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#_stable006906">Stable:</a></b></dt><dd>ICU 50 </dd></dl> </div> </div> <a id="a9d8ba1623ef7ded96bf162b4966436ac"></a> <h2 class="memtitle"><span class="permalink"><a href="#a9d8ba1623ef7ded96bf162b4966436ac">◆ </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> * </td> <td class="paramname"><em>uplrules</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </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> * </td> <td class="paramname"><em>keyword</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </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> * </td> <td class="paramname"><em>status</em> </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#_stable006908">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">◆ </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> * </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> * </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> * </td> <td class="paramname"><em>keyword</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </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> * </td> <td class="paramname"><em>status</em> </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#_stable006909">Stable:</a></b></dt><dd>ICU 64 </dd></dl> </div> </div> <a id="a5f4b0af98562f8feaa45c2d4058212c4"></a> <h2 class="memtitle"><span class="permalink"><a href="#a5f4b0af98562f8feaa45c2d4058212c4">◆ </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> * </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> * </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> * </td> <td class="paramname"><em>keyword</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </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> * </td> <td class="paramname"><em>status</em> </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#_stable006910">Stable:</a></b></dt><dd>ICU 68 </dd></dl> </div> </div> <a id="abe6b54b1c98191bd493b04210422efa8"></a> <h2 class="memtitle"><span class="permalink"><a href="#abe6b54b1c98191bd493b04210422efa8">◆ </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> * </td> <td class="paramname"><em>uplrules</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </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> * </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> * </td> <td class="paramname"><em>keyword</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </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> * </td> <td class="paramname"><em>status</em> </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#_internal000926">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  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.14 </small></address> </body> </html>
| ver. 1.6 |
Github
|
.
| PHP 8.3.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка