JezK
Edit File: classnumber_1_1NumberFormatterSettings.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.14"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>ICU 60.1: icu::number::NumberFormatterSettings< Derived > Class Template Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">ICU 60.1  <span id="projectnumber">60.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.14 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceicu.html">icu</a></li><li class="navelem"><b>number</b></li><li class="navelem"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">NumberFormatterSettings</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pro-attribs">Protected Attributes</a> | <a href="#friends">Friends</a> </div> <div class="headertitle"> <div class="title">icu::number::NumberFormatterSettings< Derived > Class Template Reference</div> </div> </div><!--header--> <div class="contents"> <p>An abstract base class for specifying settings related to number formatting. <a href="classicu_1_1number_1_1NumberFormatterSettings.html#details">More...</a></p> <p><code>#include <<a class="el" href="numberformatter_8h_source.html">numberformatter.h</a>></code></p> <div class="dynheader"> Inheritance diagram for icu::number::NumberFormatterSettings< Derived >:</div> <div class="dyncontent"> <div class="center"> <img src="classicu_1_1number_1_1NumberFormatterSettings.png" usemap="#icu::number::NumberFormatterSettings_3C_20Derived_20_3E_map" alt=""/> <map id="icu::number::NumberFormatterSettings_3C_20Derived_20_3E_map" name="icu::number::NumberFormatterSettings_3C_20Derived_20_3E_map"> <area href="classicu_1_1number_1_1LocalizedNumberFormatter.html" title="A NumberFormatter that has a locale associated with it; this means .format() methods are available..." alt="icu::number::LocalizedNumberFormatter" shape="rect" coords="0,56,294,80"/> <area href="classicu_1_1number_1_1UnlocalizedNumberFormatter.html" title="A NumberFormatter that does not yet have a locale. " alt="icu::number::UnlocalizedNumberFormatter" shape="rect" coords="304,56,598,80"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:ae95fcd63f68a5cdfabde04945a2f0911"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#ae95fcd63f68a5cdfabde04945a2f0911">notation</a> (const <a class="el" href="classicu_1_1number_1_1Notation.html">Notation</a> &notation) const</td></tr> <tr class="memdesc:ae95fcd63f68a5cdfabde04945a2f0911"><td class="mdescLeft"> </td><td class="mdescRight">Specifies the notation style (simple, scientific, or compact) for rendering numbers. <a href="#ae95fcd63f68a5cdfabde04945a2f0911">More...</a><br /></td></tr> <tr class="separator:ae95fcd63f68a5cdfabde04945a2f0911"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a70ecfb9e6180b0dc4f16b5d2b61e8e98"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a70ecfb9e6180b0dc4f16b5d2b61e8e98">unit</a> (const <a class="el" href="classicu_1_1MeasureUnit.html">icu::MeasureUnit</a> &unit) const</td></tr> <tr class="memdesc:a70ecfb9e6180b0dc4f16b5d2b61e8e98"><td class="mdescLeft"> </td><td class="mdescRight">Specifies the unit (unit of measure, currency, or percent) to associate with rendered numbers. <a href="#a70ecfb9e6180b0dc4f16b5d2b61e8e98">More...</a><br /></td></tr> <tr class="separator:a70ecfb9e6180b0dc4f16b5d2b61e8e98"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae1459eb8c5560aae68270326e9b63527"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#ae1459eb8c5560aae68270326e9b63527">adoptUnit</a> (const <a class="el" href="classicu_1_1MeasureUnit.html">icu::MeasureUnit</a> *<a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a70ecfb9e6180b0dc4f16b5d2b61e8e98">unit</a>) const</td></tr> <tr class="memdesc:ae1459eb8c5560aae68270326e9b63527"><td class="mdescLeft"> </td><td class="mdescRight">Like <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a70ecfb9e6180b0dc4f16b5d2b61e8e98" title="Specifies the unit (unit of measure, currency, or percent) to associate with rendered numbers...">unit()</a>, but takes ownership of a pointer. <a href="#ae1459eb8c5560aae68270326e9b63527">More...</a><br /></td></tr> <tr class="separator:ae1459eb8c5560aae68270326e9b63527"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a681c1c0d2a53597a610df5a82688f556"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a681c1c0d2a53597a610df5a82688f556">rounding</a> (const <a class="el" href="classicu_1_1number_1_1Rounder.html">Rounder</a> &rounder) const</td></tr> <tr class="memdesc:a681c1c0d2a53597a610df5a82688f556"><td class="mdescLeft"> </td><td class="mdescRight">Specifies the rounding strategy to use when formatting numbers. <a href="#a681c1c0d2a53597a610df5a82688f556">More...</a><br /></td></tr> <tr class="separator:a681c1c0d2a53597a610df5a82688f556"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6d9b29d800ec94b55aa617f1c7608a54"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a6d9b29d800ec94b55aa617f1c7608a54">grouping</a> (const <a class="el" href="classicu_1_1number_1_1Grouper.html">Grouper</a> &grouper) const</td></tr> <tr class="memdesc:a6d9b29d800ec94b55aa617f1c7608a54"><td class="mdescLeft"> </td><td class="mdescRight">Specifies the grouping strategy to use when formatting numbers. <a href="#a6d9b29d800ec94b55aa617f1c7608a54">More...</a><br /></td></tr> <tr class="separator:a6d9b29d800ec94b55aa617f1c7608a54"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:afa50212a0ce85fc745e9dc40896920bb"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#afa50212a0ce85fc745e9dc40896920bb">integerWidth</a> (const <a class="el" href="classicu_1_1number_1_1IntegerWidth.html">IntegerWidth</a> &style) const</td></tr> <tr class="memdesc:afa50212a0ce85fc745e9dc40896920bb"><td class="mdescLeft"> </td><td class="mdescRight">Specifies the minimum and maximum number of digits to render before the decimal mark. <a href="#afa50212a0ce85fc745e9dc40896920bb">More...</a><br /></td></tr> <tr class="separator:afa50212a0ce85fc745e9dc40896920bb"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad751412bebca5ded07742aa647c3fadc"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#ad751412bebca5ded07742aa647c3fadc">symbols</a> (const <a class="el" href="classicu_1_1DecimalFormatSymbols.html">DecimalFormatSymbols</a> &symbols) const</td></tr> <tr class="memdesc:ad751412bebca5ded07742aa647c3fadc"><td class="mdescLeft"> </td><td class="mdescRight">Specifies the symbols (decimal separator, grouping separator, percent sign, numerals, etc.) to use when rendering numbers. <a href="#ad751412bebca5ded07742aa647c3fadc">More...</a><br /></td></tr> <tr class="separator:ad751412bebca5ded07742aa647c3fadc"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4d9a6daf3c4f4efac9fbe80b89d1668e"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a4d9a6daf3c4f4efac9fbe80b89d1668e">adoptSymbols</a> (const <a class="el" href="classicu_1_1NumberingSystem.html">NumberingSystem</a> *<a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#ad751412bebca5ded07742aa647c3fadc">symbols</a>) const</td></tr> <tr class="memdesc:a4d9a6daf3c4f4efac9fbe80b89d1668e"><td class="mdescLeft"> </td><td class="mdescRight">Specifies that the given numbering system should be used when fetching symbols. <a href="#a4d9a6daf3c4f4efac9fbe80b89d1668e">More...</a><br /></td></tr> <tr class="separator:a4d9a6daf3c4f4efac9fbe80b89d1668e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af23b98911cd63b8a2bceb93fcf2158e4"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#af23b98911cd63b8a2bceb93fcf2158e4">unitWidth</a> (const <a class="el" href="numberformatter_8h.html#a5ee613b0f806f558d9ea877aa62a0c3f">UNumberUnitWidth</a> &width) const</td></tr> <tr class="memdesc:af23b98911cd63b8a2bceb93fcf2158e4"><td class="mdescLeft"> </td><td class="mdescRight">Sets the width of the unit (measure unit or currency). <a href="#af23b98911cd63b8a2bceb93fcf2158e4">More...</a><br /></td></tr> <tr class="separator:af23b98911cd63b8a2bceb93fcf2158e4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aea994e4328b9f7a4136a0cae5192fff0"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#aea994e4328b9f7a4136a0cae5192fff0">sign</a> (const <a class="el" href="numberformatter_8h.html#a18092ae1533c9c260f01c9dbf25589c9">UNumberSignDisplay</a> &width) const</td></tr> <tr class="memdesc:aea994e4328b9f7a4136a0cae5192fff0"><td class="mdescLeft"> </td><td class="mdescRight">Sets the plus/minus sign display strategy. <a href="#aea994e4328b9f7a4136a0cae5192fff0">More...</a><br /></td></tr> <tr class="separator:aea994e4328b9f7a4136a0cae5192fff0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7b03e99fe7b7da53a9ec3dee96a65bc6"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a7b03e99fe7b7da53a9ec3dee96a65bc6">decimal</a> (const <a class="el" href="numberformatter_8h.html#a1e0fe0c910e360dda5cdad3387e5a0c6">UNumberDecimalSeparatorDisplay</a> &width) const</td></tr> <tr class="memdesc:a7b03e99fe7b7da53a9ec3dee96a65bc6"><td class="mdescLeft"> </td><td class="mdescRight">Sets the decimal separator display strategy. <a href="#a7b03e99fe7b7da53a9ec3dee96a65bc6">More...</a><br /></td></tr> <tr class="separator:a7b03e99fe7b7da53a9ec3dee96a65bc6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac5480689770d10f86bb40695a49ad853"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#ac5480689770d10f86bb40695a49ad853">padding</a> (const <a class="el" href="classicu_1_1number_1_1impl_1_1Padder.html">impl::Padder</a> &padder) const</td></tr> <tr class="memdesc:ac5480689770d10f86bb40695a49ad853"><td class="mdescLeft"> </td><td class="mdescRight">Set the padding strategy. <a href="#ac5480689770d10f86bb40695a49ad853">More...</a><br /></td></tr> <tr class="separator:ac5480689770d10f86bb40695a49ad853"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6251cc4812f825173cf75762414fdfa0"><td class="memItemLeft" align="right" valign="top">Derived </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a6251cc4812f825173cf75762414fdfa0">threshold</a> (int32_t threshold) const</td></tr> <tr class="memdesc:a6251cc4812f825173cf75762414fdfa0"><td class="mdescLeft"> </td><td class="mdescRight">Internal fluent setter to support a custom regulation threshold. <a href="#a6251cc4812f825173cf75762414fdfa0">More...</a><br /></td></tr> <tr class="separator:a6251cc4812f825173cf75762414fdfa0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8e9fa209d30169e4a4643a22d509459d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a8e9fa209d30169e4a4643a22d509459d">copyErrorTo</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &outErrorCode) const</td></tr> <tr class="memdesc:a8e9fa209d30169e4a4643a22d509459d"><td class="mdescLeft"> </td><td class="mdescRight">Sets the UErrorCode if an error occurred in the fluent chain. <a href="#a8e9fa209d30169e4a4643a22d509459d">More...</a><br /></td></tr> <tr class="separator:a8e9fa209d30169e4a4643a22d509459d"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a> Protected Attributes</h2></td></tr> <tr class="memitem:ad46fb6b8060547f43bde87b2f180e022"><td class="memItemLeft" align="right" valign="top"><a id="ad46fb6b8060547f43bde87b2f180e022"></a> <a class="el" href="structicu_1_1number_1_1impl_1_1MacroProps.html">impl::MacroProps</a> </td><td class="memItemRight" valign="bottom"><b>fMacros</b></td></tr> <tr class="separator:ad46fb6b8060547f43bde87b2f180e022"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> Friends</h2></td></tr> <tr class="memitem:a467d78050c95e8f4fafef2d416818f95"><td class="memItemLeft" align="right" valign="top"><a id="a467d78050c95e8f4fafef2d416818f95"></a> class </td><td class="memItemRight" valign="bottom"><b>LocalizedNumberFormatter</b></td></tr> <tr class="separator:a467d78050c95e8f4fafef2d416818f95"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a187b708affd98efc48135253e332a95b"><td class="memItemLeft" align="right" valign="top"><a id="a187b708affd98efc48135253e332a95b"></a> class </td><td class="memItemRight" valign="bottom"><b>UnlocalizedNumberFormatter</b></td></tr> <tr class="separator:a187b708affd98efc48135253e332a95b"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><h3>template<typename Derived><br /> class icu::number::NumberFormatterSettings< Derived ></h3> <p>An abstract base class for specifying settings related to number formatting. </p> <p>This class is implemented by <a class="el" href="classicu_1_1number_1_1UnlocalizedNumberFormatter.html">UnlocalizedNumberFormatter</a> and <a class="el" href="classicu_1_1number_1_1LocalizedNumberFormatter.html">LocalizedNumberFormatter</a>. </p> <p class="definition">Definition at line <a class="el" href="numberformatter_8h_source.html#l01337">1337</a> of file <a class="el" href="numberformatter_8h_source.html">numberformatter.h</a>.</p> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="a4d9a6daf3c4f4efac9fbe80b89d1668e"></a> <h2 class="memtitle"><span class="permalink"><a href="#a4d9a6daf3c4f4efac9fbe80b89d1668e">◆ </a></span>adoptSymbols()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::adoptSymbols </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1NumberingSystem.html">NumberingSystem</a> * </td> <td class="paramname"><em>symbols</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Specifies that the given numbering system should be used when fetching symbols. </p> <ul> <li> Latin numbering system: "12,345" </li> <li> Myanmar numbering system: "၁၂,၃၄၅" </li> <li> Math Sans Bold numbering system: "𝟭𝟮,𝟯𝟰𝟱" </li> </ul> <p>Pass this method an instance of <a class="el" href="classicu_1_1NumberingSystem.html">NumberingSystem</a>. For example, to force the locale to always use the Latin alphabet numbering system (ASCII digits):</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter::with()</a>.adoptSymbols(<a class="el" href="classicu_1_1NumberingSystem.html#a3149622f8c58146a21cd9d02ce7e66b8" title="Create a numbering system from one of the predefined numbering systems specified by CLDR and known to...">NumberingSystem::createInstanceByName</a>("latn", status)) </pre><p><b>Note:</b> Calling this method will override the <a class="el" href="classicu_1_1DecimalFormatSymbols.html" title="This class represents the set of symbols needed by DecimalFormat to format numbers. ">DecimalFormatSymbols</a> previously specified in <a class="el" href="">symbols(DecimalFormatSymbols)</a>.</p> <p>The default is to choose the best numbering system for the locale.</p> <p>This method takes ownership of a pointer in order to work nicely with the <a class="el" href="classicu_1_1NumberingSystem.html" title="Defines numbering systems. ">NumberingSystem</a> factory methods.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">symbols</td><td>The <a class="el" href="classicu_1_1NumberingSystem.html" title="Defines numbering systems. ">NumberingSystem</a> to use. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1NumberingSystem.html" title="Defines numbering systems. ">NumberingSystem</a> </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000169">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> </div> </div> <a id="ae1459eb8c5560aae68270326e9b63527"></a> <h2 class="memtitle"><span class="permalink"><a href="#ae1459eb8c5560aae68270326e9b63527">◆ </a></span>adoptUnit()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::adoptUnit </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1MeasureUnit.html">icu::MeasureUnit</a> * </td> <td class="paramname"><em>unit</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Like <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a70ecfb9e6180b0dc4f16b5d2b61e8e98" title="Specifies the unit (unit of measure, currency, or percent) to associate with rendered numbers...">unit()</a>, but takes ownership of a pointer. </p> <p>Convenient for use with the <a class="el" href="classicu_1_1MeasureFormat.html" title="A formatter for measure objects. ">MeasureFormat</a> factory methods, which return pointers that need ownership.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">unit</td><td>The unit to render. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html#a70ecfb9e6180b0dc4f16b5d2b61e8e98" title="Specifies the unit (unit of measure, currency, or percent) to associate with rendered numbers...">unit</a> </dd> <dd> <a class="el" href="classicu_1_1MeasureUnit.html" title="A unit such as length, mass, volume, currency, etc. ">MeasureUnit</a> </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000165">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> </div> </div> <a id="a8e9fa209d30169e4a4643a22d509459d"></a> <h2 class="memtitle"><span class="permalink"><a href="#a8e9fa209d30169e4a4643a22d509459d">◆ </a></span>copyErrorTo()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::copyErrorTo </td> <td>(</td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>outErrorCode</em></td><td>)</td> <td> const</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Sets the UErrorCode if an error occurred in the fluent chain. </p> <p>Preserves older error codes in the outErrorCode. </p><dl class="section return"><dt>Returns</dt><dd>TRUE if <a class="el" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f" title="Does the error code indicate a failure? ">U_FAILURE(outErrorCode)</a> </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000173">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> <p class="definition">Definition at line <a class="el" href="numberformatter_8h_source.html#l01705">1705</a> of file <a class="el" href="numberformatter_8h_source.html">numberformatter.h</a>.</p> </div> </div> <a id="a7b03e99fe7b7da53a9ec3dee96a65bc6"></a> <h2 class="memtitle"><span class="permalink"><a href="#a7b03e99fe7b7da53a9ec3dee96a65bc6">◆ </a></span>decimal()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::decimal </td> <td>(</td> <td class="paramtype">const <a class="el" href="numberformatter_8h.html#a1e0fe0c910e360dda5cdad3387e5a0c6">UNumberDecimalSeparatorDisplay</a> & </td> <td class="paramname"><em>width</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Sets the decimal separator display strategy. </p> <p>This affects integer numbers with no fraction part. Most common values:</p> <ul> <li> Auto: "1" </li> <li> Always: "1." </li> </ul> <p>Pass an element from the <a class="el" href="numberformatter_8h.html#a1e0fe0c910e360dda5cdad3387e5a0c6">UNumberDecimalSeparatorDisplay</a> enum to this setter. For example:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter::with()</a>.decimal(UNumberDecimalSeparatorDisplay::UNUM_DECIMAL_SEPARATOR_ALWAYS) </pre><p>The default is AUTO decimal separator display.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">width</td><td>The decimal separator display strategy to use when rendering numbers. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="numberformatter_8h.html#a1e0fe0c910e360dda5cdad3387e5a0c6" title="An enum declaring how to render the decimal separator. ">UNumberDecimalSeparatorDisplay</a> This API might change or be removed in a future release. </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000172">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> </div> </div> <a id="a6d9b29d800ec94b55aa617f1c7608a54"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6d9b29d800ec94b55aa617f1c7608a54">◆ </a></span>grouping()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::grouping </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1number_1_1Grouper.html">Grouper</a> & </td> <td class="paramname"><em>grouper</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Specifies the grouping strategy to use when formatting numbers. </p> <ul> <li> Default grouping: "12,300" and "1,230" </li> <li> Grouping with at least 2 digits: "12,300" and "1230" </li> <li> No grouping: "12300" and "1230" </li> </ul> <p>The exact grouping widths will be chosen based on the locale.</p> <p>Pass this method the return value of one of the factory methods on <a class="el" href="classicu_1_1number_1_1Grouper.html">Grouper</a>. For example:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter::with()</a>.grouping(Grouper::min2()) </pre><p>The default is to perform grouping without concern for the minimum grouping digits.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">grouper</td><td>The grouping strategy to use. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1number_1_1Grouper.html">Grouper</a> </dd> <dd> <a class="el" href="classicu_1_1number_1_1Notation.html" title="A class that defines the notation style to be used when formatting numbers in NumberFormatter. ">Notation</a> </dd></dl> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000432">Internal:</a></b></dt><dd><p class="startdd">Do not use. This API is for internal use only. </p> <p class="enddd">Do not use. This API is for internal use only. ICU 60: This API is technical preview. </p> </dd></dl> </div> </div> <a id="afa50212a0ce85fc745e9dc40896920bb"></a> <h2 class="memtitle"><span class="permalink"><a href="#afa50212a0ce85fc745e9dc40896920bb">◆ </a></span>integerWidth()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::integerWidth </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1number_1_1IntegerWidth.html">IntegerWidth</a> & </td> <td class="paramname"><em>style</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Specifies the minimum and maximum number of digits to render before the decimal mark. </p> <ul> <li> Zero minimum integer digits: ".08" </li> <li> One minimum integer digit: "0.08" </li> <li> Two minimum integer digits: "00.08" </li> </ul> <p>Pass this method the return value of <a class="el" href="">IntegerWidth#zeroFillTo(int)</a>. For example:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter::with()</a>.integerWidth(IntegerWidth::zeroFillTo(2)) </pre><p>The default is to have one minimum integer digit.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">style</td><td>The integer width to use. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1number_1_1IntegerWidth.html" title="A class that defines the strategy for padding and truncating integers before the decimal separator...">IntegerWidth</a> </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000167">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> </div> </div> <a id="ae95fcd63f68a5cdfabde04945a2f0911"></a> <h2 class="memtitle"><span class="permalink"><a href="#ae95fcd63f68a5cdfabde04945a2f0911">◆ </a></span>notation()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::notation </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1number_1_1Notation.html">Notation</a> & </td> <td class="paramname"><em>notation</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Specifies the notation style (simple, scientific, or compact) for rendering numbers. </p> <ul> <li> Simple notation: "12,300" </li> <li> Scientific notation: "1.23E4" </li> <li> Compact notation: "12K" </li> </ul> <p>All notation styles will be properly localized with locale data, and all notation styles are compatible with units, rounding strategies, and other number formatter settings.</p> <p>Pass this method the return value of a <a class="el" href="classicu_1_1number_1_1Notation.html">Notation</a> factory method. For example:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter::with()</a>.notation(Notation::compactShort()) </pre><p>The default is to use simple notation.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">notation</td><td>The notation strategy to use. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1number_1_1Notation.html" title="A class that defines the notation style to be used when formatting numbers in NumberFormatter. ">Notation</a> </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000163">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> </div> </div> <a id="ac5480689770d10f86bb40695a49ad853"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac5480689770d10f86bb40695a49ad853">◆ </a></span>padding()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::padding </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1number_1_1impl_1_1Padder.html">impl::Padder</a> & </td> <td class="paramname"><em>padder</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Set the padding strategy. </p> <p>May be added to ICU 61; see #13338.</p> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000433">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 60: This API is ICU internal only. </dd></dl> </div> </div> <a id="a681c1c0d2a53597a610df5a82688f556"></a> <h2 class="memtitle"><span class="permalink"><a href="#a681c1c0d2a53597a610df5a82688f556">◆ </a></span>rounding()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::rounding </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1number_1_1Rounder.html">Rounder</a> & </td> <td class="paramname"><em>rounder</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Specifies the rounding strategy to use when formatting numbers. </p> <ul> <li> Round to 3 decimal places: "3.142" </li> <li> Round to 3 significant figures: "3.14" </li> <li> Round to the closest nickel: "3.15" </li> <li> Do not perform rounding: "3.1415926..." </li> </ul> <p>Pass this method the return value of one of the factory methods on <a class="el" href="classicu_1_1number_1_1Rounder.html">Rounder</a>. For example:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter::with()</a>.rounding(Rounder::fixedFraction(2)) </pre><p>In most cases, the default rounding strategy is to round to 6 fraction places; i.e., <code>Rounder.maxFraction(6)</code>. The exceptions are if compact notation is being used, then the compact notation rounding strategy is used (see <a class="el" href="classicu_1_1number_1_1Notation.html#a28581e9aa7310a440217cc19e7a66235">Notation#compactShort</a> for details), or if the unit is a currency, then standard currency rounding is used, which varies from currency to currency (see <a class="el" href="classicu_1_1number_1_1Rounder.html#ac8bda895ef66064c9e4fb91a2fae0225">Rounder#currency</a> for details).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">rounder</td><td>The rounding strategy to use. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1number_1_1Rounder.html" title="A class that defines the rounding strategy to be used when formatting numbers in NumberFormatter. ">Rounder</a> This API might change or be removed in a future release. </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000166">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> </div> </div> <a id="aea994e4328b9f7a4136a0cae5192fff0"></a> <h2 class="memtitle"><span class="permalink"><a href="#aea994e4328b9f7a4136a0cae5192fff0">◆ </a></span>sign()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::sign </td> <td>(</td> <td class="paramtype">const <a class="el" href="numberformatter_8h.html#a18092ae1533c9c260f01c9dbf25589c9">UNumberSignDisplay</a> & </td> <td class="paramname"><em>width</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Sets the plus/minus sign display strategy. </p> <p>Most common values:</p> <ul> <li> Auto: "123", "-123" </li> <li> Always: "+123", "-123" </li> <li> Accounting: "$123", "($123)" </li> </ul> <p>Pass an element from the <a class="el" href="numberformatter_8h.html#add0d83db5211578a00a847edabbed102">UNumberSignDisplay</a> enum to this setter. For example:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter::with()</a>.sign(UNumberSignDisplay::UNUM_SIGN_ALWAYS) </pre><p>The default is AUTO sign display.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">width</td><td>The sign display strategy to use when rendering numbers. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="numberformatter_8h.html#add0d83db5211578a00a847edabbed102" title="An enum declaring how to denote positive and negative numbers. ">UNumberSignDisplay</a> This API might change or be removed in a future release. </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000171">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> </div> </div> <a id="ad751412bebca5ded07742aa647c3fadc"></a> <h2 class="memtitle"><span class="permalink"><a href="#ad751412bebca5ded07742aa647c3fadc">◆ </a></span>symbols()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::symbols </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1DecimalFormatSymbols.html">DecimalFormatSymbols</a> & </td> <td class="paramname"><em>symbols</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Specifies the symbols (decimal separator, grouping separator, percent sign, numerals, etc.) to use when rendering numbers. </p> <ul> <li> <em>en_US</em> symbols: "12,345.67" </li> <li> <em>fr_FR</em> symbols: "12&nbsp;345,67" </li> <li> <em>de_CH</em> symbols: "12’345.67" </li> <li> <em>my_MY</em> symbols: "၁၂,၃၄၅.၆၇" </li> </ul> <p>Pass this method an instance of <a class="el" href="classicu_1_1DecimalFormatSymbols.html">DecimalFormatSymbols</a>. For example:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter::with()</a>.symbols(<a class="el" href="classicu_1_1DecimalFormatSymbols.html" title="This class represents the set of symbols needed by DecimalFormat to format numbers. ">DecimalFormatSymbols</a>(<a class="el" href="classicu_1_1Locale.html" title="A Locale object represents a specific geographical, political, or cultural region. ">Locale</a>("de_CH"), status)) </pre><p><b>Note:</b> <a class="el" href="classicu_1_1DecimalFormatSymbols.html" title="This class represents the set of symbols needed by DecimalFormat to format numbers. ">DecimalFormatSymbols</a> automatically chooses the best numbering system based on the locale. In the examples above, the first three are using the Latin numbering system, and the fourth is using the Myanmar numbering system.</p> <p><b>Note:</b> The instance of <a class="el" href="classicu_1_1DecimalFormatSymbols.html" title="This class represents the set of symbols needed by DecimalFormat to format numbers. ">DecimalFormatSymbols</a> will be copied: changes made to the symbols object after passing it into the fluent chain will not be seen.</p> <p><b>Note:</b> Calling this method will override the <a class="el" href="classicu_1_1NumberingSystem.html" title="Defines numbering systems. ">NumberingSystem</a> previously specified in <a class="el" href="">symbols(NumberingSystem)</a>.</p> <p>The default is to choose the symbols based on the locale specified in the fluent chain.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">symbols</td><td>The <a class="el" href="classicu_1_1DecimalFormatSymbols.html" title="This class represents the set of symbols needed by DecimalFormat to format numbers. ">DecimalFormatSymbols</a> to use. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1DecimalFormatSymbols.html" title="This class represents the set of symbols needed by DecimalFormat to format numbers. ">DecimalFormatSymbols</a> </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000168">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> </div> </div> <a id="a6251cc4812f825173cf75762414fdfa0"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6251cc4812f825173cf75762414fdfa0">◆ </a></span>threshold()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::threshold </td> <td>(</td> <td class="paramtype">int32_t </td> <td class="paramname"><em>threshold</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Internal fluent setter to support a custom regulation threshold. </p> <p>A threshold of 1 causes the data structures to be built right away. A threshold of 0 prevents the data structures from being built.</p> <dl class="internal"><dt><b><a class="el" href="internal.html#_internal000434">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. ICU 60: This API is ICU internal only. </dd></dl> </div> </div> <a id="a70ecfb9e6180b0dc4f16b5d2b61e8e98"></a> <h2 class="memtitle"><span class="permalink"><a href="#a70ecfb9e6180b0dc4f16b5d2b61e8e98">◆ </a></span>unit()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::unit </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1MeasureUnit.html">icu::MeasureUnit</a> & </td> <td class="paramname"><em>unit</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Specifies the unit (unit of measure, currency, or percent) to associate with rendered numbers. </p> <ul> <li> Unit of measure: "12.3 meters" </li> <li> Currency: "$12.30" </li> <li> Percent: "12.3%" </li> </ul> <p>All units will be properly localized with locale data, and all units are compatible with notation styles, rounding strategies, and other number formatter settings.</p> <p>Pass this method any instance of <a class="el" href="classicu_1_1MeasureUnit.html">MeasureUnit</a>. For units of measure:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter.with()</a>.adoptUnit(MeasureUnit::createMeter(status)) </pre><p>Currency:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter.with()</a>::unit(<a class="el" href="classicu_1_1CurrencyUnit.html" title="A unit of currency, such as USD (U.S. ">CurrencyUnit</a>(u"USD", status)) </pre><p>Percent:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter.with()</a>::unit(<a class="el" href="classicu_1_1NoUnit.html#a8a5fa3458dfd9315cd457d15f83ea6e4" title="Returns an instance for percent, or 1/100 of a base unit. ">NoUnit.percent()</a>) </pre><p>The default is to render without units (equivalent to <a class="el" href="classicu_1_1NoUnit.html#a6a4b6d95c7a2a21d6b2817010b5f1e74" title="Returns an instance for the base unit (dimensionless and no scaling). ">NoUnit.base()</a>).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">unit</td><td>The unit to render. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain. </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1MeasureUnit.html" title="A unit such as length, mass, volume, currency, etc. ">MeasureUnit</a> </dd> <dd> Currency </dd> <dd> <a class="el" href="classicu_1_1NoUnit.html" title="Dimensionless unit for percent and permille. ">NoUnit</a> </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000164">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> </div> </div> <a id="af23b98911cd63b8a2bceb93fcf2158e4"></a> <h2 class="memtitle"><span class="permalink"><a href="#af23b98911cd63b8a2bceb93fcf2158e4">◆ </a></span>unitWidth()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Derived> </div> <table class="memname"> <tr> <td class="memname">Derived <a class="el" href="classicu_1_1number_1_1NumberFormatterSettings.html">icu::number::NumberFormatterSettings</a>< Derived >::unitWidth </td> <td>(</td> <td class="paramtype">const <a class="el" href="numberformatter_8h.html#a5ee613b0f806f558d9ea877aa62a0c3f">UNumberUnitWidth</a> & </td> <td class="paramname"><em>width</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Sets the width of the unit (measure unit or currency). </p> <p>Most common values:</p> <ul> <li> Short: "$12.00", "12 m" </li> <li> ISO Code: "USD 12.00" </li> <li> Full name: "12.00 US dollars", "12 meters" </li> </ul> <p>Pass an element from the <a class="el" href="numberformatter_8h.html#a07ddf4ac13a5c17f72f967b1dd8bd464">UNumberUnitWidth</a> enum to this setter. For example:</p> <pre> <a class="el" href="classicu_1_1number_1_1NumberFormatter.html#a98b94ede3bc4bec69584ee8d8027fd98" title="Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not curren...">NumberFormatter::with()</a>.unitWidth(UNumberUnitWidth::UNUM_UNIT_WIDTH_FULL_NAME) </pre><p>The default is the SHORT width.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">width</td><td>The width to use when rendering numbers. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The fluent chain </dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="numberformatter_8h.html#a07ddf4ac13a5c17f72f967b1dd8bd464" title="An enum declaring how to render units, including currencies. ">UNumberUnitWidth</a> </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000170">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 60 </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="numberformatter_8h_source.html">numberformatter.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.14 </small></address> </body> </html>