Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > f51238514e2abe817779ad2fe01b0759 > files > 172

icu-doc-4.4-2.1mdv2010.2.i586.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!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"/>
<title>ICU 4.4: RuleBasedNumberFormat Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>RuleBasedNumberFormat Class Reference</h1><!-- doxytag: class="RuleBasedNumberFormat" --><!-- doxytag: inherits="NumberFormat" -->
<p>The <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> class formats numbers according to a set of rules.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="rbnf_8h_source.html">rbnf.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for RuleBasedNumberFormat:</div>
<div class="dynsection">
 <div class="center">
  <img src="classRuleBasedNumberFormat.gif" usemap="#RuleBasedNumberFormat_map" alt=""/>
  <map id="RuleBasedNumberFormat_map" name="RuleBasedNumberFormat_map">
<area href="classNumberFormat.html" alt="NumberFormat" shape="rect" coords="0,168,155,192"/>
<area href="classFormat.html" alt="Format" shape="rect" coords="0,112,155,136"/>
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,155,80"/>
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,155,24"/>
</map>
 </div>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a8f0d0ad50098c80905c0a73956fcbf0a">RuleBasedNumberFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;rules, <a class="el" href="structUParseError.html">UParseError</a> &amp;perror, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> that behaves according to the description passed in.  <a href="#a8f0d0ad50098c80905c0a73956fcbf0a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a0d744ac818c48f05cf3c997307ca49ec">RuleBasedNumberFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;rules, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;localizations, <a class="el" href="structUParseError.html">UParseError</a> &amp;perror, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> that behaves according to the description passed in.  <a href="#a0d744ac818c48f05cf3c997307ca49ec"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a3e623e929757c2b08d45753e91e30ebc">RuleBasedNumberFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;rules, const <a class="el" href="classLocale.html">Locale</a> &amp;locale, <a class="el" href="structUParseError.html">UParseError</a> &amp;perror, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> that behaves according to the rules passed in.  <a href="#a3e623e929757c2b08d45753e91e30ebc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a7dadd148dad700a933592dbfd86d780e">RuleBasedNumberFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;rules, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;localizations, const <a class="el" href="classLocale.html">Locale</a> &amp;locale, <a class="el" href="structUParseError.html">UParseError</a> &amp;perror, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> that behaves according to the description passed in.  <a href="#a7dadd148dad700a933592dbfd86d780e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a17a665980e75dfadf93301de2e495982">RuleBasedNumberFormat</a> (<a class="el" href="rbnf_8h.html#a2ef7bd419418b4628b33a7270c11f68d">URBNFRuleSetTag</a> tag, const <a class="el" href="classLocale.html">Locale</a> &amp;locale, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> from a predefined ruleset.  <a href="#a17a665980e75dfadf93301de2e495982"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a11252a1c12f92e65eb2c979c1bf8583b">RuleBasedNumberFormat</a> (const <a class="el" href="classRuleBasedNumberFormat.html">RuleBasedNumberFormat</a> &amp;rhs)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor.  <a href="#a11252a1c12f92e65eb2c979c1bf8583b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classRuleBasedNumberFormat.html">RuleBasedNumberFormat</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#ae492ee51caf11c6244a9ca9b6ddaecda">operator=</a> (const <a class="el" href="classRuleBasedNumberFormat.html">RuleBasedNumberFormat</a> &amp;rhs)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator.  <a href="#ae492ee51caf11c6244a9ca9b6ddaecda"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#ac326bb31489a5d402f1265830defff8a">~RuleBasedNumberFormat</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release memory allocated for a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> when you are finished with it.  <a href="#ac326bb31489a5d402f1265830defff8a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classFormat.html">Format</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a52a2721aa01037d7e03f8c0cca6b4a77">clone</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clone this object polymorphically.  <a href="#a52a2721aa01037d7e03f8c0cca6b4a77"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a2068e1cbee7eb25feaecb6c160a958a1">operator==</a> (const <a class="el" href="classFormat.html">Format</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if the given <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> objects are semantically equal.  <a href="#a2068e1cbee7eb25feaecb6c160a958a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#afe23d122acc869aa9d952ad12b9073cf">getRules</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return the rules that were provided to the <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>.  <a href="#afe23d122acc869aa9d952ad12b9073cf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a73d67c85b5bed8429b455aae19a38bbe">getNumberOfRuleSetNames</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of public rule set names.  <a href="#a73d67c85b5bed8429b455aae19a38bbe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a09ddadc168c5c8d37fb2b0685acedba3">getRuleSetName</a> (int32_t index) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the name of the index'th public ruleSet.  <a href="#a09ddadc168c5c8d37fb2b0685acedba3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a435092a093791b2ca2095888343b82cf">getNumberOfRuleSetDisplayNameLocales</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of locales for which we have localized rule set display names.  <a href="#a435092a093791b2ca2095888343b82cf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classLocale.html">Locale</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a1eba080384a030c748d1af5babb65e09">getRuleSetDisplayNameLocale</a> (int32_t index, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the index'th display name locale.  <a href="#a1eba080384a030c748d1af5babb65e09"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a38b1b89d3515d55b1cc912ea2b4400ec">getRuleSetDisplayName</a> (int32_t index, const <a class="el" href="classLocale.html">Locale</a> &amp;locale=Locale::getDefault())</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the rule set display names for the provided locale.  <a href="#a38b1b89d3515d55b1cc912ea2b4400ec"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#ae4ab9929c10007152a32af73f89cf3c2">getRuleSetDisplayName</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;ruleSetName, const <a class="el" href="classLocale.html">Locale</a> &amp;locale=Locale::getDefault())</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the rule set display name for the provided rule set and locale.  <a href="#ae4ab9929c10007152a32af73f89cf3c2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#ad18c54375913d2426aae02a4328c3187">format</a> (int32_t number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;toAppendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the specified 32-bit number using the default ruleset.  <a href="#ad18c54375913d2426aae02a4328c3187"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#adf7cb11d07aac568236df549488e0b03">format</a> (int64_t number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;toAppendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the specified 64-bit number using the default ruleset.  <a href="#adf7cb11d07aac568236df549488e0b03"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a246ec02e8f3d84efc98f449f84ace6ab">format</a> (double number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;toAppendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the specified number using the default ruleset.  <a href="#a246ec02e8f3d84efc98f449f84ace6ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#abe88e5ebd3a774349d6f5e08b033f829">format</a> (int32_t number, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;ruleSetName, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;toAppendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the specified number using the named ruleset.  <a href="#abe88e5ebd3a774349d6f5e08b033f829"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a9fe3e6f8f9a2c402e5d201d27db69de7">format</a> (int64_t number, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;ruleSetName, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;toAppendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the specified 64-bit number using the named ruleset.  <a href="#a9fe3e6f8f9a2c402e5d201d27db69de7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#ac7eeb9cc017a8fe4516d15af3403bbdd">format</a> (double number, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;ruleSetName, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;toAppendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the specified number using the named ruleset.  <a href="#ac7eeb9cc017a8fe4516d15af3403bbdd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a640cf2259d20cc8f03736f6fe0d18d1b">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &amp;obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;toAppendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the specified number using the default ruleset.  <a href="#a640cf2259d20cc8f03736f6fe0d18d1b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#ae97cffb5bc4fca4e5f7d89b41a333983">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &amp;obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;result, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Redeclared <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> method.  <a href="#ae97cffb5bc4fca4e5f7d89b41a333983"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#afe15fa9d2566bb4339e105f59f64f974">format</a> (double number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;output) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Redeclared <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> method.  <a href="#afe15fa9d2566bb4339e105f59f64f974"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a920e08de6b0aca3f83b1e6c35dff9ad9">format</a> (int32_t number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;output) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Redeclared <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> method.  <a href="#a920e08de6b0aca3f83b1e6c35dff9ad9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a16c9b8e02cf8bb2f5c5d122143dbeb60">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;text, <a class="el" href="classFormattable.html">Formattable</a> &amp;result, <a class="el" href="classParsePosition.html">ParsePosition</a> &amp;parsePosition) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parses the specfied string, beginning at the specified position, according to this formatter's rules.  <a href="#a16c9b8e02cf8bb2f5c5d122143dbeb60"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a90cc5cec4399cea7c3f1e600ca800ebb">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;text, <a class="el" href="classFormattable.html">Formattable</a> &amp;result, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Redeclared <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> method.  <a href="#a90cc5cec4399cea7c3f1e600ca800ebb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#aa3c9501c62b8f9b629225f5a0d63c214">setLenient</a> (<a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> enabled)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Turns lenient parse mode on and off.  <a href="#aa3c9501c62b8f9b629225f5a0d63c214"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a15b474bf4a11e7d1df7164f9b9a7df90">isLenient</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if lenient-parse mode is turned on.  <a href="#a15b474bf4a11e7d1df7164f9b9a7df90"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#ae80d597b9cc9fefcf37d9137e3db5cff">setDefaultRuleSet</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;ruleSetName, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Override the default rule set to use.  <a href="#ae80d597b9cc9fefcf37d9137e3db5cff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a90b944154fdce68e4f48a2393d5d70fb">getDefaultRuleSetName</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the name of the current default rule set.  <a href="#a90b944154fdce68e4f48a2393d5d70fb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#aa570fa8ffe7f29c9d6d7ab4b3303fa2a">getDynamicClassID</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for the actual class.  <a href="#aa570fa8ffe7f29c9d6d7ab4b3303fa2a"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRuleBasedNumberFormat.html#a3f59d38e1adfa24dd9b33b1996c018b8">getStaticClassID</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for this class.  <a href="#a3f59d38e1adfa24dd9b33b1996c018b8"></a><br/></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a39532680c0f7f54a04caf8df763cf092"></a><!-- doxytag: member="RuleBasedNumberFormat::NFSubstitution" ref="a39532680c0f7f54a04caf8df763cf092" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>NFSubstitution</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa51afff2371ac40962212a34eb0e3ff8"></a><!-- doxytag: member="RuleBasedNumberFormat::NFRule" ref="aa51afff2371ac40962212a34eb0e3ff8" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>NFRule</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abde6176913d71dc5c18c7b31c0de34a4"></a><!-- doxytag: member="RuleBasedNumberFormat::FractionalPartSubstitution" ref="abde6176913d71dc5c18c7b31c0de34a4" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>FractionalPartSubstitution</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> class formats numbers according to a set of rules. </p>
<p>This number formatter is typically used for spelling out numeric values in words (e.g., 25,3476 as "twenty-five thousand three hundred seventy-six" or "vingt-cinq mille trois cents soixante-seize" or "f&uuml;nfundzwanzigtausenddreihundertsechsundsiebzig"), but can also be used for other complicated formatting tasks, such as formatting a number of seconds as hours, minutes and seconds (e.g., 3,730 as "1:02:10").</p>
<p>The resources contain three predefined formatters for each locale: spellout, which spells out a value in words (123 is "one hundred twenty-three"); ordinal, which appends an ordinal suffix to the end of a numeral (123 is "123rd"); and duration, which shows a duration in seconds as hours, minutes, and seconds (123 is "2:03").&nbsp; The client can also define more specialized <code><a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a></code>s by supplying programmer-defined rule sets.</p>
<p>The behavior of a <code><a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a></code> is specified by a textual description that is either passed to the constructor as a <code>String</code> or loaded from a resource bundle. In its simplest form, the description consists of a semicolon-delimited list of <em>rules.</em> Each rule has a string of output text and a value or range of values it is applicable to. In a typical spellout rule set, the first twenty rules are the words for the numbers from 0 to 19:</p>
<pre>zero; one; two; three; four; five; six; seven; eight; nine;
 ten; eleven; twelve; thirteen; fourteen; fifteen; sixteen; seventeen; eighteen; nineteen;</pre><p>For larger numbers, we can use the preceding set of rules to format the ones place, and we only have to supply the words for the multiples of 10:</p>
<pre> 20: twenty[-&gt;&gt;];
 30: thirty[-&gt;&gt;];
 40: forty[-&gt;&gt;];
 50: fifty[-&gt;&gt;];
 60: sixty[-&gt;&gt;];
 70: seventy[-&gt;&gt;];
 80: eighty[-&gt;&gt;];
 90: ninety[-&gt;&gt;];</pre><p>In these rules, the <em>base value</em> is spelled out explicitly and set off from the rule's output text with a colon. The rules are in a sorted list, and a rule is applicable to all numbers from its own base value to one less than the next rule's base value. The "&gt;&gt;" token is called a <em>substitution</em> and tells the fomatter to isolate the number's ones digit, format it using this same set of rules, and place the result at the position of the "&gt;&gt;" token. Text in brackets is omitted if the number being formatted is an even multiple of 10 (the hyphen is a literal hyphen; 24 is "twenty-four," not "twenty four").</p>
<p>For even larger numbers, we can actually look up several parts of the number in the list:</p>
<pre>100: &lt;&lt; hundred[ &gt;&gt;];</pre><p>The "&lt;&lt;" represents a new kind of substitution. The &lt;&lt; isolates the hundreds digit (and any digits to its left), formats it using this same rule set, and places the result where the "&lt;&lt;" was. Notice also that the meaning of &gt;&gt; has changed: it now refers to both the tens and the ones digits. The meaning of both substitutions depends on the rule's base value. The base value determines the rule's <em>divisor,</em> which is the highest power of 10 that is less than or equal to the base value (the user can change this). To fill in the substitutions, the formatter divides the number being formatted by the divisor. The integral quotient is used to fill in the &lt;&lt; substitution, and the remainder is used to fill in the &gt;&gt; substitution. The meaning of the brackets changes similarly: text in brackets is omitted if the value being formatted is an even multiple of the rule's divisor. The rules are applied recursively, so if a substitution is filled in with text that includes another substitution, that substitution is also filled in.</p>
<p>This rule covers values up to 999, at which point we add another rule:</p>
<pre>1000: &lt;&lt; thousand[ &gt;&gt;];</pre><p>Again, the meanings of the brackets and substitution tokens shift because the rule's base value is a higher power of 10, changing the rule's divisor. This rule can actually be used all the way up to 999,999. This allows us to finish out the rules as follows:</p>
<pre> 1,000,000: &lt;&lt; million[ &gt;&gt;];
 1,000,000,000: &lt;&lt; billion[ &gt;&gt;];
 1,000,000,000,000: &lt;&lt; trillion[ &gt;&gt;];
 1,000,000,000,000,000: OUT OF RANGE!;</pre><p>Commas, periods, and spaces can be used in the base values to improve legibility and are ignored by the rule parser. The last rule in the list is customarily treated as an "overflow rule," applying to everything from its base value on up, and often (as in this example) being used to print out an error message or default representation. Notice also that the size of the major groupings in large numbers is controlled by the spacing of the rules: because in English we group numbers by thousand, the higher rules are separated from each other by a factor of 1,000.</p>
<p>To see how these rules actually work in practice, consider the following example: Formatting 25,430 with this rule set would work like this:</p>
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td><p><b>&lt;&lt; thousand &gt;&gt;</b> </p>
</td><td><p>[the rule whose base value is 1,000 is applicable to 25,340]  </p>
</td></tr>
<tr>
<td><p><b>twenty-&gt;&gt;</b> thousand &gt;&gt; </p>
</td><td><p>[25,340 over 1,000 is 25. The rule for 20 applies.]  </p>
</td></tr>
<tr>
<td><p>twenty-<b>five</b> thousand &gt;&gt; </p>
</td><td><p>[25 mod 10 is 5. The rule for 5 is "five."  </p>
</td></tr>
<tr>
<td><p>twenty-five thousand <b>&lt;&lt; hundred &gt;&gt;</b> </p>
</td><td><p>[25,340 mod 1,000 is 340. The rule for 100 applies.]  </p>
</td></tr>
<tr>
<td><p>twenty-five thousand <b>three</b> hundred &gt;&gt; </p>
</td><td><p>[340 over 100 is 3. The rule for 3 is "three."]  </p>
</td></tr>
<tr>
<td><p>twenty-five thousand three hundred <b>forty</b> </p>
</td><td><p>[340 mod 100 is 40. The rule for 40 applies. Since 40 divides evenly by 10, the hyphen and substitution in the brackets are omitted.]  </p>
</td></tr>
</table>
<p>The above syntax suffices only to format positive integers. To format negative numbers, we add a special rule:</p>
<pre>-x: minus &gt;&gt;;</pre><p>This is called a <em>negative-number rule,</em> and is identified by "-x" where the base value would be. This rule is used to format all negative numbers. the &gt;&gt; token here means "find the number's absolute value, format it with these rules, and put the result here."</p>
<p>We also add a special rule called a <em>fraction rule </em>for numbers with fractional parts:</p>
<pre>x.x: &lt;&lt; point &gt;&gt;;</pre><p>This rule is used for all positive non-integers (negative non-integers pass through the negative-number rule first and then through this rule). Here, the &lt;&lt; token refers to the number's integral part, and the &gt;&gt; to the number's fractional part. The fractional part is formatted as a series of single-digit numbers (e.g., 123.456 would be formatted as "one hundred twenty-three point four five six").</p>
<p>To see how this rule syntax is applied to various languages, examine the resource data.</p>
<p>There is actually much more flexibility built into the rule language than the description above shows. A formatter may own multiple rule sets, which can be selected by the caller, and which can use each other to fill in their substitutions. Substitutions can also be filled in with digits, using a <a class="el" href="classDecimalFormat.html" title="DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers...">DecimalFormat</a> object. There is syntax that can be used to alter a rule's divisor in various ways. And there is provision for much more flexible fraction handling. A complete description of the rule syntax follows:</p>
<hr/>
<p>The description of a <code><a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a></code>'s behavior consists of one or more <em>rule sets.</em> Each rule set consists of a name, a colon, and a list of <em>rules.</em> A rule set name must begin with a % sign. Rule sets with names that begin with a single % sign are <em>public:</em> the caller can specify that they be used to format and parse numbers. Rule sets with names that begin with %% are <em>private:</em> they exist only for the use of other rule sets. If a formatter only has one rule set, the name may be omitted.</p>
<p>The user can also specify a special "rule set" named <code>%lenient-parse</code>. The body of <code>%lenient-parse</code> isn't a set of number-formatting rules, but a <code><a class="el" href="classRuleBasedCollator.html" title="The RuleBasedCollator class provides the simple implementation of Collator, using...">RuleBasedCollator</a></code> description which is used to define equivalences for lenient parsing. For more information on the syntax, see <code><a class="el" href="classRuleBasedCollator.html" title="The RuleBasedCollator class provides the simple implementation of Collator, using...">RuleBasedCollator</a></code>. For more information on lenient parsing, see <code>setLenientParse()</code>. <em>Note:</em> symbols that have syntactic meaning in collation rules, such as '&amp;', have no particular meaning when appearing outside of the <code>lenient-parse</code> rule set.</p>
<p>The body of a rule set consists of an ordered, semicolon-delimited list of <em>rules.</em> Internally, every rule has a base value, a divisor, rule text, and zero, one, or two <em>substitutions.</em> These parameters are controlled by the description syntax, which consists of a <em>rule descriptor,</em> a colon, and a <em>rule body.</em></p>
<p>A rule descriptor can take one of the following forms (text in <em>italics</em> is the name of a token):</p>
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td><p><em>bv</em>: </p>
</td><td><p><em>bv</em> specifies the rule's base value. <em>bv</em> is a decimal number expressed using ASCII digits. <em>bv</em> may contain spaces, period, and commas, which are ignored. The rule's divisor is the highest power of 10 less than or equal to the base value.  </p>
</td></tr>
<tr>
<td><p><em>bv</em>/<em>rad</em>: </p>
</td><td><p><em>bv</em> specifies the rule's base value. The rule's divisor is the highest power of <em>rad</em> less than or equal to the base value.  </p>
</td></tr>
<tr>
<td><p><em>bv</em>&gt;: </p>
</td><td><p><em>bv</em> specifies the rule's base value. To calculate the divisor, let the radix be 10, and the exponent be the highest exponent of the radix that yields a result less than or equal to the base value. Every &gt; character after the base value decreases the exponent by 1. If the exponent is positive or 0, the divisor is the radix raised to the power of the exponent; otherwise, the divisor is 1.  </p>
</td></tr>
<tr>
<td><p><em>bv</em>/<em>rad</em>&gt;: </p>
</td><td><p><em>bv</em> specifies the rule's base value. To calculate the divisor, let the radix be <em>rad</em>, and the exponent be the highest exponent of the radix that yields a result less than or equal to the base value. Every &gt; character after the radix decreases the exponent by 1. If the exponent is positive or 0, the divisor is the radix raised to the power of the exponent; otherwise, the divisor is 1.  </p>
</td></tr>
<tr>
<td><p>-x: </p>
</td><td><p>The rule is a negative-number rule.  </p>
</td></tr>
<tr>
<td><p>x.x: </p>
</td><td><p>The rule is an <em>improper fraction rule.</em>  </p>
</td></tr>
<tr>
<td><p>0.x: </p>
</td><td><p>The rule is a <em>proper fraction rule.</em>  </p>
</td></tr>
<tr>
<td><p>x.0: </p>
</td><td><p>The rule is a <em>master rule.</em>  </p>
</td></tr>
<tr>
<td><p><em>nothing</em> </p>
</td><td><p>If the rule's rule descriptor is left out, the base value is one plus the preceding rule's base value (or zero if this is the first rule in the list) in a normal rule set.&nbsp; In a fraction rule set, the base value is the same as the preceding rule's base value.  </p>
</td></tr>
</table>
<p>A rule set may be either a regular rule set or a <em>fraction rule set,</em> depending on whether it is used to format a number's integral part (or the whole number) or a number's fractional part. Using a rule set to format a rule's fractional part makes it a fraction rule set.</p>
<p>Which rule is used to format a number is defined according to one of the following algorithms: If the rule set is a regular rule set, do the following:</p>
<ul>
<li>
If the rule set includes a master rule (and the number was passed in as a <code>double</code>), use the master rule.&nbsp; (If the number being formatted was passed in as a <code>long</code>, the master rule is ignored.) </li>
<li>
If the number is negative, use the negative-number rule. </li>
<li>
If the number has a fractional part and is greater than 1, use the improper fraction rule. </li>
<li>
If the number has a fractional part and is between 0 and 1, use the proper fraction rule. </li>
<li>
Binary-search the rule list for the rule with the highest base value less than or equal to the number. If that rule has two substitutions, its base value is not an even multiple of its divisor, and the number <em>is</em> an even multiple of the rule's divisor, use the rule that precedes it in the rule list. Otherwise, use the rule itself. </li>
</ul>
<p>If the rule set is a fraction rule set, do the following:</p>
<ul>
<li>
Ignore negative-number and fraction rules. </li>
<li>
For each rule in the list, multiply the number being formatted (which will always be between 0 and 1) by the rule's base value. Keep track of the distance between the result the nearest integer. </li>
<li>
Use the rule that produced the result closest to zero in the above calculation. In the event of a tie or a direct hit, use the first matching rule encountered. (The idea here is to try each rule's base value as a possible denominator of a fraction. Whichever denominator produces the fraction closest in value to the number being formatted wins.) If the rule following the matching rule has the same base value, use it if the numerator of the fraction is anything other than 1; if the numerator is 1, use the original matching rule. (This is to allow singular and plural forms of the rule text without a lot of extra hassle.) </li>
</ul>
<p>A rule's body consists of a string of characters terminated by a semicolon. The rule may include zero, one, or two <em>substitution tokens,</em> and a range of text in brackets. The brackets denote optional text (and may also include one or both substitutions). The exact meanings of the substitution tokens, and under what conditions optional text is omitted, depend on the syntax of the substitution token and the context. The rest of the text in a rule body is literal text that is output when the rule matches the number being formatted.</p>
<p>A substitution token begins and ends with a <em>token character.</em> The token character and the context together specify a mathematical operation to be performed on the number being formatted. An optional <em>substitution descriptor </em>specifies how the value resulting from that operation is used to fill in the substitution. The position of the substitution token in the rule body specifies the location of the resultant text in the original rule text.</p>
<p>The meanings of the substitution token characters are as follows:</p>
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td><p>&gt;&gt; </p>
</td><td><p>in normal rule </p>
</td><td><p>Divide the number by the rule's divisor and format the remainder  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in negative-number rule </p>
</td><td><p>Find the absolute value of the number and format the result  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in fraction or master rule </p>
</td><td><p>Isolate the number's fractional part and format it.  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in rule in fraction rule set </p>
</td><td><p>Not allowed.  </p>
</td></tr>
<tr>
<td><p>&gt;&gt;&gt; </p>
</td><td><p>in normal rule </p>
</td><td><p>Divide the number by the rule's divisor and format the remainder, but bypass the normal rule-selection process and just use the rule that precedes this one in this rule list.  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in all other rules </p>
</td><td><p>Not allowed.  </p>
</td></tr>
<tr>
<td><p>&lt;&lt; </p>
</td><td><p>in normal rule </p>
</td><td><p>Divide the number by the rule's divisor and format the quotient  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in negative-number rule </p>
</td><td><p>Not allowed.  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in fraction or master rule </p>
</td><td><p>Isolate the number's integral part and format it.  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in rule in fraction rule set </p>
</td><td><p>Multiply the number by the rule's base value and format the result.  </p>
</td></tr>
<tr>
<td><p>== </p>
</td><td><p>in all rule sets </p>
</td><td><p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> the number unchanged  </p>
</td></tr>
<tr>
<td><p>[] </p>
</td><td><p>in normal rule </p>
</td><td><p>Omit the optional text if the number is an even multiple of the rule's divisor  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in negative-number rule </p>
</td><td><p>Not allowed.  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in improper-fraction rule </p>
</td><td><p>Omit the optional text if the number is between 0 and 1 (same as specifying both an x.x rule and a 0.x rule)  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in master rule </p>
</td><td><p>Omit the optional text if the number is an integer (same as specifying both an x.x rule and an x.0 rule)  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in proper-fraction rule </p>
</td><td><p>Not allowed.  </p>
</td></tr>
<tr>
<td><p></p>
</td><td><p>in rule in fraction rule set </p>
</td><td><p>Omit the optional text if multiplying the number by the rule's base value yields 1.  </p>
</td></tr>
</table>
<p>The substitution descriptor (i.e., the text between the token characters) may take one of three forms:</p>
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td><p>a rule set name </p>
</td><td><p>Perform the mathematical operation on the number, and format the result using the named rule set.  </p>
</td></tr>
<tr>
<td><p>a <a class="el" href="classDecimalFormat.html" title="DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers...">DecimalFormat</a> pattern </p>
</td><td><p>Perform the mathematical operation on the number, and format the result using a <a class="el" href="classDecimalFormat.html" title="DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers...">DecimalFormat</a> with the specified pattern.&nbsp; The pattern must begin with 0 or #.  </p>
</td></tr>
<tr>
<td><p>nothing </p>
</td><td><p>Perform the mathematical operation on the number, and format the result using the rule set containing the current rule, except: </p>
<ul>
<li>
You can't have an empty substitution descriptor with a == substitution. </li>
<li>
If you omit the substitution descriptor in a &gt;&gt; substitution in a fraction rule, format the result one digit at a time using the rule set containing the current rule. </li>
<li>
If you omit the substitution descriptor in a &lt;&lt; substitution in a rule in a fraction rule set, format the result using the default rule set for this formatter. </li>
</ul>
</td></tr>
</table>
<p>Whitespace is ignored between a rule set name and a rule set body, between a rule descriptor and a rule body, or between rules. If a rule body begins with an apostrophe, the apostrophe is ignored, but all text after it becomes significant (this is how you can have a rule's rule text begin with whitespace). There is no escape function: the semicolon is not allowed in rule set names or in rule text, and the colon is not allowed in rule set names. The characters beginning a substitution token are always treated as the beginning of a substitution token.</p>
<p>See the resource data and the demo program for annotated examples of real rule sets using these features.</p>
<p><em>User subclasses are not supported.</em> While clients may write subclasses, such code will not necessarily work and will not be guaranteed to work stably from release to release.</p>
<p><b>Localizations</b> </p>
<p>Constructors are available that allow the specification of localizations for the public rule sets (and also allow more control over what public rule sets are available). Localization data is represented as a textual description. The description represents an array of arrays of string. The first element is an array of the public rule set names, each of these must be one of the public rule set names that appear in the rules. Only names in this array will be treated as public rule set names by the API. Each subsequent element is an array of localizations of these names. The first element of one of these subarrays is the locale name, and the remaining elements are localizations of the public rule set names, in the same order as they were listed in the first arrray. </p>
<p>In the syntax, angle brackets '&lt;', '&gt;' are used to delimit the arrays, and comma ',' is used to separate elements of an array. Whitespace is ignored, unless quoted. </p>
<p>For example:</p>
<pre>
 &lt; &lt; foo, bar, baz &gt;,
   &lt; en, Foo, Bar, Baz &gt;,
   &lt; fr, 'le Foo', 'le Bar', 'le Baz' &gt;
   &lt; zh, \u7532, \u4e59, \u4e19 &gt; &gt;
 </pre> <dl class="author"><dt><b>Author:</b></dt><dd>Richard Gillam </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> </dd>
<dd>
<a class="el" href="classDecimalFormat.html" title="DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers...">DecimalFormat</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002913">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="rbnf_8h_source.html#l00503">503</a> of file <a class="el" href="rbnf_8h_source.html">rbnf.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8f0d0ad50098c80905c0a73956fcbf0a"></a><!-- doxytag: member="RuleBasedNumberFormat::RuleBasedNumberFormat" ref="a8f0d0ad50098c80905c0a73956fcbf0a" args="(const UnicodeString &amp;rules, UParseError &amp;perror, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RuleBasedNumberFormat::RuleBasedNumberFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>perror</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> that behaves according to the description passed in. </p>
<p>The formatter uses the default locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rules</em>&nbsp;</td><td>A description of the formatter's desired behavior. See the class documentation for a complete explanation of the description syntax. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>perror</em>&nbsp;</td><td>The parse error if an error was encountered. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The status indicating whether the constructor succeeded. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002914">Stable:</a></b></dt><dd>ICU 3.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a0d744ac818c48f05cf3c997307ca49ec"></a><!-- doxytag: member="RuleBasedNumberFormat::RuleBasedNumberFormat" ref="a0d744ac818c48f05cf3c997307ca49ec" args="(const UnicodeString &amp;rules, const UnicodeString &amp;localizations, UParseError &amp;perror, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RuleBasedNumberFormat::RuleBasedNumberFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>localizations</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>perror</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> that behaves according to the description passed in. </p>
<p>The formatter uses the default locale. </p>
<p>The localizations data provides information about the public rule sets and their localized display names for different locales. The first element in the list is an array of the names of the public rule sets. The first element in this array is the initial default ruleset. The remaining elements in the list are arrays of localizations of the names of the public rule sets. Each of these is one longer than the initial array, with the first String being the ULocale ID, and the remaining Strings being the localizations of the rule set names, in the same order as the initial array. Arrays are NULL-terminated. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rules</em>&nbsp;</td><td>A description of the formatter's desired behavior. See the class documentation for a complete explanation of the description syntax. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>localizations</em>&nbsp;</td><td>the localization information. names in the description. These will be copied by the constructor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>perror</em>&nbsp;</td><td>The parse error if an error was encountered. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The status indicating whether the constructor succeeded. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002915">Stable:</a></b></dt><dd>ICU 3.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a3e623e929757c2b08d45753e91e30ebc"></a><!-- doxytag: member="RuleBasedNumberFormat::RuleBasedNumberFormat" ref="a3e623e929757c2b08d45753e91e30ebc" args="(const UnicodeString &amp;rules, const Locale &amp;locale, UParseError &amp;perror, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RuleBasedNumberFormat::RuleBasedNumberFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>perror</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> that behaves according to the rules passed in. </p>
<p>The formatter uses the specified locale to determine the characters to use when formatting numerals, and to define equivalences for lenient parsing. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rules</em>&nbsp;</td><td>The formatter rules. See the class documentation for a complete explanation of the rule syntax. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>A locale that governs which characters are used for formatting values in numerals and which characters are equivalent in lenient parsing. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>perror</em>&nbsp;</td><td>The parse error if an error was encountered. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The status indicating whether the constructor succeeded. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002916">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a7dadd148dad700a933592dbfd86d780e"></a><!-- doxytag: member="RuleBasedNumberFormat::RuleBasedNumberFormat" ref="a7dadd148dad700a933592dbfd86d780e" args="(const UnicodeString &amp;rules, const UnicodeString &amp;localizations, const Locale &amp;locale, UParseError &amp;perror, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RuleBasedNumberFormat::RuleBasedNumberFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>localizations</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>perror</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> that behaves according to the description passed in. </p>
<p>The formatter uses the default locale. </p>
<p>The localizations data provides information about the public rule sets and their localized display names for different locales. The first element in the list is an array of the names of the public rule sets. The first element in this array is the initial default ruleset. The remaining elements in the list are arrays of localizations of the names of the public rule sets. Each of these is one longer than the initial array, with the first String being the ULocale ID, and the remaining Strings being the localizations of the rule set names, in the same order as the initial array. Arrays are NULL-terminated. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rules</em>&nbsp;</td><td>A description of the formatter's desired behavior. See the class documentation for a complete explanation of the description syntax. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>localizations</em>&nbsp;</td><td>a list of localizations for the rule set names in the description. These will be copied by the constructor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>A locale that governs which characters are used for formatting values in numerals and which characters are equivalent in lenient parsing. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>perror</em>&nbsp;</td><td>The parse error if an error was encountered. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The status indicating whether the constructor succeeded. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002917">Stable:</a></b></dt><dd>ICU 3.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a17a665980e75dfadf93301de2e495982"></a><!-- doxytag: member="RuleBasedNumberFormat::RuleBasedNumberFormat" ref="a17a665980e75dfadf93301de2e495982" args="(URBNFRuleSetTag tag, const Locale &amp;locale, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RuleBasedNumberFormat::RuleBasedNumberFormat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="rbnf_8h.html#a2ef7bd419418b4628b33a7270c11f68d">URBNFRuleSetTag</a>&nbsp;</td>
          <td class="paramname"> <em>tag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</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> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> from a predefined ruleset. </p>
<p>The selector code choosed among three possible predefined formats: spellout, ordinal, and duration. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>tag</em>&nbsp;</td><td>A selector code specifying which kind of formatter to create for that locale. There are four legal values: URBNF_SPELLOUT, which creates a formatter that spells out a value in words in the desired language, URBNF_ORDINAL, which attaches an ordinal suffix from the desired language to the end of a number (e.g. "123rd"), URBNF_DURATION, which formats a duration in seconds as hours, minutes, and seconds, and URBNF_NUMBERING_SYSTEM, which is used to invoke rules for alternate numbering systems such as the Hebrew numbering system, or for Roman Numerals, etc. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>The locale for the formatter. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The status indicating whether the constructor succeeded. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002918">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a11252a1c12f92e65eb2c979c1bf8583b"></a><!-- doxytag: member="RuleBasedNumberFormat::RuleBasedNumberFormat" ref="a11252a1c12f92e65eb2c979c1bf8583b" args="(const RuleBasedNumberFormat &amp;rhs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RuleBasedNumberFormat::RuleBasedNumberFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classRuleBasedNumberFormat.html">RuleBasedNumberFormat</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rhs</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copy constructor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rhs</em>&nbsp;</td><td>the object to be copied from. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002919">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="ac326bb31489a5d402f1265830defff8a"></a><!-- doxytag: member="RuleBasedNumberFormat::~RuleBasedNumberFormat" ref="ac326bb31489a5d402f1265830defff8a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual RuleBasedNumberFormat::~RuleBasedNumberFormat </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Release memory allocated for a <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> when you are finished with it. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002921">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a52a2721aa01037d7e03f8c0cca6b4a77"></a><!-- doxytag: member="RuleBasedNumberFormat::clone" ref="a52a2721aa01037d7e03f8c0cca6b4a77" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classFormat.html">Format</a>* RuleBasedNumberFormat::clone </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clone this object polymorphically. </p>
<p>The caller is responsible for deleting the result when done. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A copy of the object. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002922">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Implements <a class="el" href="classFormat.html#a4e7ebd5cfd390c35e2bda88257f8b51a">Format</a>.</p>

</div>
</div>
<a class="anchor" id="a920e08de6b0aca3f83b1e6c35dff9ad9"></a><!-- doxytag: member="RuleBasedNumberFormat::format" ref="a920e08de6b0aca3f83b1e6c35dff9ad9" args="(int32_t number, UnicodeString &amp;output) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp; RuleBasedNumberFormat::format </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>output</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Redeclared <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> method. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>the long value to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>output</em>&nbsp;</td><td>Output param which will receive the formatted string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A reference to 'output'. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002940">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#aaa05c67fc637d9127756d854581a17fc">NumberFormat</a>.</p>

<p>Definition at line <a class="el" href="rbnf_8h_source.html#l01028">1028</a> of file <a class="el" href="rbnf_8h_source.html">rbnf.h</a>.</p>

<p>References <a class="el" href="classRuleBasedNumberFormat.html#ad18c54375913d2426aae02a4328c3187">format()</a>.</p>

</div>
</div>
<a class="anchor" id="afe15fa9d2566bb4339e105f59f64f974"></a><!-- doxytag: member="RuleBasedNumberFormat::format" ref="afe15fa9d2566bb4339e105f59f64f974" args="(double number, UnicodeString &amp;output) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp; RuleBasedNumberFormat::format </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>output</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Redeclared <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> method. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>the double value to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>output</em>&nbsp;</td><td>Output param which will receive the formatted string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A reference to 'output'. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002939">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#ad0d0bf658489e6a530a6c7716ef44320">NumberFormat</a>.</p>

<p>Definition at line <a class="el" href="rbnf_8h_source.html#l01022">1022</a> of file <a class="el" href="rbnf_8h_source.html">rbnf.h</a>.</p>

<p>References <a class="el" href="classRuleBasedNumberFormat.html#ad18c54375913d2426aae02a4328c3187">format()</a>.</p>

</div>
</div>
<a class="anchor" id="ae97cffb5bc4fca4e5f7d89b41a333983"></a><!-- doxytag: member="RuleBasedNumberFormat::format" ref="ae97cffb5bc4fca4e5f7d89b41a333983" args="(const Formattable &amp;obj, UnicodeString &amp;result, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp; RuleBasedNumberFormat::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Redeclared <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> method. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>the object to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>Output param which will receive the formatted string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param set to success/failure code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A reference to 'result'. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002938">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#a67d754f52d336d911454e97ba32654de">NumberFormat</a>.</p>

<p>Definition at line <a class="el" href="rbnf_8h_source.html#l01009">1009</a> of file <a class="el" href="rbnf_8h_source.html">rbnf.h</a>.</p>

<p>References <a class="el" href="classRuleBasedNumberFormat.html#ad18c54375913d2426aae02a4328c3187">format()</a>.</p>

</div>
</div>
<a class="anchor" id="a640cf2259d20cc8f03736f6fe0d18d1b"></a><!-- doxytag: member="RuleBasedNumberFormat::format" ref="a640cf2259d20cc8f03736f6fe0d18d1b" args="(const Formattable &amp;obj, UnicodeString &amp;toAppendTo, FieldPosition &amp;pos, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; RuleBasedNumberFormat::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>toAppendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats the specified number using the default ruleset. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>The number to format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>toAppendTo</em>&nbsp;</td><td>the string that will hold the (appended) result </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>the fieldposition </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the status </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A textual representation of the number. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002937">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="ac7eeb9cc017a8fe4516d15af3403bbdd"></a><!-- doxytag: member="RuleBasedNumberFormat::format" ref="ac7eeb9cc017a8fe4516d15af3403bbdd" args="(double number, const UnicodeString &amp;ruleSetName, UnicodeString &amp;toAppendTo, FieldPosition &amp;pos, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; RuleBasedNumberFormat::format </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ruleSetName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>toAppendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats the specified number using the named ruleset. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>The number to format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ruleSetName</em>&nbsp;</td><td>The name of the rule set to format the number with. This must be the name of a valid public rule set for this formatter. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>toAppendTo</em>&nbsp;</td><td>the string that will hold the (appended) result </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>the fieldposition </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the status </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A textual representation of the number. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002936">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a9fe3e6f8f9a2c402e5d201d27db69de7"></a><!-- doxytag: member="RuleBasedNumberFormat::format" ref="a9fe3e6f8f9a2c402e5d201d27db69de7" args="(int64_t number, const UnicodeString &amp;ruleSetName, UnicodeString &amp;toAppendTo, FieldPosition &amp;pos, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; RuleBasedNumberFormat::format </td>
          <td>(</td>
          <td class="paramtype">int64_t&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ruleSetName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>toAppendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats the specified 64-bit number using the named ruleset. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>The number to format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ruleSetName</em>&nbsp;</td><td>The name of the rule set to format the number with. This must be the name of a valid public rule set for this formatter. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>toAppendTo</em>&nbsp;</td><td>the string that will hold the (appended) result </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>the fieldposition </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the status </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A textual representation of the number. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002935">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

</div>
</div>
<a class="anchor" id="abe88e5ebd3a774349d6f5e08b033f829"></a><!-- doxytag: member="RuleBasedNumberFormat::format" ref="abe88e5ebd3a774349d6f5e08b033f829" args="(int32_t number, const UnicodeString &amp;ruleSetName, UnicodeString &amp;toAppendTo, FieldPosition &amp;pos, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; RuleBasedNumberFormat::format </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ruleSetName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>toAppendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats the specified number using the named ruleset. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>The number to format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ruleSetName</em>&nbsp;</td><td>The name of the rule set to format the number with. This must be the name of a valid public rule set for this formatter. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>toAppendTo</em>&nbsp;</td><td>the string that will hold the (appended) result </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>the fieldposition </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the status </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A textual representation of the number. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002934">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a246ec02e8f3d84efc98f449f84ace6ab"></a><!-- doxytag: member="RuleBasedNumberFormat::format" ref="a246ec02e8f3d84efc98f449f84ace6ab" args="(double number, UnicodeString &amp;toAppendTo, FieldPosition &amp;pos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; RuleBasedNumberFormat::format </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>toAppendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats the specified number using the default ruleset. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>The number to format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>toAppendTo</em>&nbsp;</td><td>the string that will hold the (appended) result </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>the fieldposition </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A textual representation of the number. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002933">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implements <a class="el" href="classNumberFormat.html#a7078d52baaa94ddf6e0680a4bc2f542a">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="adf7cb11d07aac568236df549488e0b03"></a><!-- doxytag: member="RuleBasedNumberFormat::format" ref="adf7cb11d07aac568236df549488e0b03" args="(int64_t number, UnicodeString &amp;toAppendTo, FieldPosition &amp;pos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; RuleBasedNumberFormat::format </td>
          <td>(</td>
          <td class="paramtype">int64_t&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>toAppendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats the specified 64-bit number using the default ruleset. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>The number to format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>toAppendTo</em>&nbsp;</td><td>the string that will hold the (appended) result </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>the fieldposition </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A textual representation of the number. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002932">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#ac64ccd4841f822f601f2533e63e0592b">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="ad18c54375913d2426aae02a4328c3187"></a><!-- doxytag: member="RuleBasedNumberFormat::format" ref="ad18c54375913d2426aae02a4328c3187" args="(int32_t number, UnicodeString &amp;toAppendTo, FieldPosition &amp;pos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; RuleBasedNumberFormat::format </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>toAppendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats the specified 32-bit number using the default ruleset. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>The number to format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>toAppendTo</em>&nbsp;</td><td>the string that will hold the (appended) result </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>the fieldposition </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A textual representation of the number. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002931">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implements <a class="el" href="classNumberFormat.html#acaaca11795df052b165e82261b7825f1">NumberFormat</a>.</p>

<p>Referenced by <a class="el" href="rbnf_8h_source.html#l01009">format()</a>.</p>

</div>
</div>
<a class="anchor" id="a90b944154fdce68e4f48a2393d5d70fb"></a><!-- doxytag: member="RuleBasedNumberFormat::getDefaultRuleSetName" ref="a90b944154fdce68e4f48a2393d5d70fb" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> RuleBasedNumberFormat::getDefaultRuleSetName </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the name of the current default rule set. </p>
<p>If the current rule set is not public, returns a bogus (and empty) <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the name of the current default rule set </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002946">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aa570fa8ffe7f29c9d6d7ab4b3303fa2a"></a><!-- doxytag: member="RuleBasedNumberFormat::getDynamicClassID" ref="aa570fa8ffe7f29c9d6d7ab4b3303fa2a" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> RuleBasedNumberFormat::getDynamicClassID </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>ICU "poor man's RTTI", returns a UClassID for the actual class. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002948">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>Implements <a class="el" href="classNumberFormat.html#a63c193a4db6a1552073bf069d5d31749">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a435092a093791b2ca2095888343b82cf"></a><!-- doxytag: member="RuleBasedNumberFormat::getNumberOfRuleSetDisplayNameLocales" ref="a435092a093791b2ca2095888343b82cf" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t RuleBasedNumberFormat::getNumberOfRuleSetDisplayNameLocales </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the number of locales for which we have localized rule set display names. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of locales for which we have localized rule set display names. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002927">Stable:</a></b></dt><dd>ICU 3.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a73d67c85b5bed8429b455aae19a38bbe"></a><!-- doxytag: member="RuleBasedNumberFormat::getNumberOfRuleSetNames" ref="a73d67c85b5bed8429b455aae19a38bbe" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t RuleBasedNumberFormat::getNumberOfRuleSetNames </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the number of public rule set names. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of public rule set names. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002925">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="afe23d122acc869aa9d952ad12b9073cf"></a><!-- doxytag: member="RuleBasedNumberFormat::getRules" ref="afe23d122acc869aa9d952ad12b9073cf" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> RuleBasedNumberFormat::getRules </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>return the rules that were provided to the <a class="el" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the result String that was passed in </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002924">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ae4ab9929c10007152a32af73f89cf3c2"></a><!-- doxytag: member="RuleBasedNumberFormat::getRuleSetDisplayName" ref="ae4ab9929c10007152a32af73f89cf3c2" args="(const UnicodeString &amp;ruleSetName, const Locale &amp;locale=Locale::getDefault())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> RuleBasedNumberFormat::getRuleSetDisplayName </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ruleSetName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em> = <code>Locale::getDefault()</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the rule set display name for the provided rule set and locale. </p>
<p>The locale is matched against the locales for which there is display name data, using normal fallback rules. If no locale matches, the default display name is returned. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the display name for the rule set </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002930">Stable:</a></b></dt><dd>ICU 3.2 </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classRuleBasedNumberFormat.html#a38b1b89d3515d55b1cc912ea2b4400ec" title="Return the rule set display names for the provided locale.">getRuleSetDisplayName</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a38b1b89d3515d55b1cc912ea2b4400ec"></a><!-- doxytag: member="RuleBasedNumberFormat::getRuleSetDisplayName" ref="a38b1b89d3515d55b1cc912ea2b4400ec" args="(int32_t index, const Locale &amp;locale=Locale::getDefault())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> RuleBasedNumberFormat::getRuleSetDisplayName </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em> = <code>Locale::getDefault()</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the rule set display names for the provided locale. </p>
<p>These are in the same order as those returned by getRuleSetName. The locale is matched against the locales for which there is display name data, using normal fallback rules. If no locale matches, the default display names are returned. (These are the internal rule set names minus the leading ''.) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>the index of the rule set </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>the locale (returned by getRuleSetDisplayNameLocales) for which the localized display name is desired </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the display name for the given index, which might be bogus if there is an error </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classRuleBasedNumberFormat.html#a09ddadc168c5c8d37fb2b0685acedba3" title="Return the name of the index&#39;th public ruleSet.">getRuleSetName</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002929">Stable:</a></b></dt><dd>ICU 3.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a1eba080384a030c748d1af5babb65e09"></a><!-- doxytag: member="RuleBasedNumberFormat::getRuleSetDisplayNameLocale" ref="a1eba080384a030c748d1af5babb65e09" args="(int32_t index, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classLocale.html">Locale</a> RuleBasedNumberFormat::getRuleSetDisplayNameLocale </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the index'th display name locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>the index of the locale </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>set to a failure code when this function fails </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the locale </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classRuleBasedNumberFormat.html#a435092a093791b2ca2095888343b82cf" title="Return the number of locales for which we have localized rule set display names.">getNumberOfRuleSetDisplayNameLocales</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002928">Stable:</a></b></dt><dd>ICU 3.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a09ddadc168c5c8d37fb2b0685acedba3"></a><!-- doxytag: member="RuleBasedNumberFormat::getRuleSetName" ref="a09ddadc168c5c8d37fb2b0685acedba3" args="(int32_t index) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> RuleBasedNumberFormat::getRuleSetName </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>index</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the name of the index'th public ruleSet. </p>
<p>If index is not valid, the function returns null. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>the index of the ruleset </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the name of the index'th public ruleSet. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002926">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a3f59d38e1adfa24dd9b33b1996c018b8"></a><!-- doxytag: member="RuleBasedNumberFormat::getStaticClassID" ref="a3f59d38e1adfa24dd9b33b1996c018b8" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> RuleBasedNumberFormat::getStaticClassID </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>ICU "poor man's RTTI", returns a UClassID for this class. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002947">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#acfeb8972959e9383b026761d0e9e1e5e">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a15b474bf4a11e7d1df7164f9b9a7df90"></a><!-- doxytag: member="RuleBasedNumberFormat::isLenient" ref="a15b474bf4a11e7d1df7164f9b9a7df90" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> RuleBasedNumberFormat::isLenient </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if lenient-parse mode is turned on. </p>
<p>Lenient parsing is off by default. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if lenient-parse mode is turned on. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classRuleBasedNumberFormat.html#aa3c9501c62b8f9b629225f5a0d63c214" title="Turns lenient parse mode on and off.">setLenient</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002944">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="rbnf_8h_source.html#l01042">1042</a> of file <a class="el" href="rbnf_8h_source.html">rbnf.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae492ee51caf11c6244a9ca9b6ddaecda"></a><!-- doxytag: member="RuleBasedNumberFormat::operator=" ref="ae492ee51caf11c6244a9ca9b6ddaecda" args="(const RuleBasedNumberFormat &amp;rhs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classRuleBasedNumberFormat.html">RuleBasedNumberFormat</a>&amp; RuleBasedNumberFormat::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classRuleBasedNumberFormat.html">RuleBasedNumberFormat</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rhs</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assignment operator. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rhs</em>&nbsp;</td><td>the object to be copied from. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002920">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#a8b9d5c0937f4da69d9a229fd10f8ec38">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a2068e1cbee7eb25feaecb6c160a958a1"></a><!-- doxytag: member="RuleBasedNumberFormat::operator==" ref="a2068e1cbee7eb25feaecb6c160a958a1" args="(const Format &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> RuleBasedNumberFormat::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return true if the given <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> objects are semantically equal. </p>
<p>Objects of different subclasses are considered unequal. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>the object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the given <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> objects are semantically equal. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002923">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#a97f4f81efd4747024deaf88ceb4d80a3">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a90cc5cec4399cea7c3f1e600ca800ebb"></a><!-- doxytag: member="RuleBasedNumberFormat::parse" ref="a90cc5cec4399cea7c3f1e600ca800ebb" args="(const UnicodeString &amp;text, Formattable &amp;result, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RuleBasedNumberFormat::parse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Redeclared <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> method. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>The string to parse </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>the result of the parse, either a double or a long. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param set to failure code when a problem occurs. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002942">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#a01ac6e0a7a47b2d8e387752d1a024b29">NumberFormat</a>.</p>

<p>Definition at line <a class="el" href="rbnf_8h_source.html#l01034">1034</a> of file <a class="el" href="rbnf_8h_source.html">rbnf.h</a>.</p>

<p>References <a class="el" href="classRuleBasedNumberFormat.html#a16c9b8e02cf8bb2f5c5d122143dbeb60">parse()</a>.</p>

</div>
</div>
<a class="anchor" id="a16c9b8e02cf8bb2f5c5d122143dbeb60"></a><!-- doxytag: member="RuleBasedNumberFormat::parse" ref="a16c9b8e02cf8bb2f5c5d122143dbeb60" args="(const UnicodeString &amp;text, Formattable &amp;result, ParsePosition &amp;parsePosition) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void RuleBasedNumberFormat::parse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classParsePosition.html">ParsePosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>parsePosition</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parses the specfied string, beginning at the specified position, according to this formatter's rules. </p>
<p>This will match the string against all of the formatter's public rule sets and return the value corresponding to the longest parseable substring. This function's behavior is affected by the lenient parse mode. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>The string to parse </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>the result of the parse, either a double or a long. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parsePosition</em>&nbsp;</td><td>On entry, contains the position of the first character in "text" to examine. On exit, has been updated to contain the position of the first character in "text" that wasn't consumed by the parse. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classRuleBasedNumberFormat.html#aa3c9501c62b8f9b629225f5a0d63c214" title="Turns lenient parse mode on and off.">setLenient</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002941">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implements <a class="el" href="classNumberFormat.html#ab2c59c0b036a413b6735c6d50b88ae25">NumberFormat</a>.</p>

<p>Referenced by <a class="el" href="rbnf_8h_source.html#l01034">parse()</a>.</p>

</div>
</div>
<a class="anchor" id="ae80d597b9cc9fefcf37d9137e3db5cff"></a><!-- doxytag: member="RuleBasedNumberFormat::setDefaultRuleSet" ref="ae80d597b9cc9fefcf37d9137e3db5cff" args="(const UnicodeString &amp;ruleSetName, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void RuleBasedNumberFormat::setDefaultRuleSet </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ruleSetName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Override the default rule set to use. </p>
<p>If ruleSetName is null, reset to the initial default rule set. If the rule set is not a public rule set name, U_ILLEGAL_ARGUMENT_ERROR is returned in status. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ruleSetName</em>&nbsp;</td><td>the name of the rule set, or null to reset the initial default. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>set to failure code when a problem occurs. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002945">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="aa3c9501c62b8f9b629225f5a0d63c214"></a><!-- doxytag: member="RuleBasedNumberFormat::setLenient" ref="aa3c9501c62b8f9b629225f5a0d63c214" args="(UBool enabled)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void RuleBasedNumberFormat::setLenient </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>enabled</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Turns lenient parse mode on and off. </p>
<p>When in lenient parse mode, the formatter uses a <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> for parsing the text. Only primary differences are treated as significant. This means that case differences, accent differences, alternate spellings of the same letter (e.g., ae and a-umlaut in German), ignorable characters, etc. are ignored in matching the text. In many cases, numerals will be accepted in place of words or phrases as well.</p>
<p>For example, all of the following will correctly parse as 255 in English in lenient-parse mode: <br/>
"two hundred fifty-five" <br/>
"two hundred fifty five" <br/>
"TWO HUNDRED FIFTY-FIVE" <br/>
"twohundredfiftyfive" <br/>
"2 hundred fifty-5"</p>
<p>The <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> used is determined by the locale that was passed to this object on construction. The description passed to this object on construction may supply additional collation rules that are appended to the end of the default collator for the locale, enabling additional equivalences (such as adding more ignorable characters or permitting spelled-out version of symbols; see the demo program for examples).</p>
<p>It's important to emphasize that even strict parsing is relatively lenient: it will accept some text that it won't produce as output. In English, for example, it will correctly parse "two hundred zero" and "fifteen hundred".</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>enabled</em>&nbsp;</td><td>If true, turns lenient-parse mode on; if false, turns it off. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classRuleBasedCollator.html" title="The RuleBasedCollator class provides the simple implementation of Collator, using...">RuleBasedCollator</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002943">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="rbnf_8h_source.html">rbnf.h</a></li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr size="1"/><address style="text-align: right;"><small>Generated on 16 Mar 2010 for ICU 4.4 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>