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

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

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

<p>Builder class for <a class="el" href="classicu_1_1BytesTrie.html" title="Light-weight, non-const reader class for a BytesTrie.">BytesTrie</a>.  
 <a href="classicu_1_1BytesTrieBuilder.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="bytestriebuilder_8h_source.html">bytestriebuilder.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for icu::BytesTrieBuilder:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classicu_1_1BytesTrieBuilder.png" alt=""/>
 </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:a36f4bdebf1028359705ca1467da7bf2e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1BytesTrieBuilder.html#a36f4bdebf1028359705ca1467da7bf2e">BytesTrieBuilder</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;errorCode)</td></tr>
<tr class="memdesc:a36f4bdebf1028359705ca1467da7bf2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an empty builder.  <a href="classicu_1_1BytesTrieBuilder.html#a36f4bdebf1028359705ca1467da7bf2e">More...</a><br /></td></tr>
<tr class="separator:a36f4bdebf1028359705ca1467da7bf2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a854862c66e6db2302ac8d477cabffd1b"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1BytesTrieBuilder.html#a854862c66e6db2302ac8d477cabffd1b">~BytesTrieBuilder</a> ()</td></tr>
<tr class="memdesc:a854862c66e6db2302ac8d477cabffd1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="classicu_1_1BytesTrieBuilder.html#a854862c66e6db2302ac8d477cabffd1b">More...</a><br /></td></tr>
<tr class="separator:a854862c66e6db2302ac8d477cabffd1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac1ce2a0e1010d7e9a759587e708d029"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1BytesTrieBuilder.html">BytesTrieBuilder</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029">add</a> (<a class="el" href="classicu_1_1StringPiece.html">StringPiece</a> s, int32_t value, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;errorCode)</td></tr>
<tr class="memdesc:aac1ce2a0e1010d7e9a759587e708d029"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a (byte sequence, value) pair.  <a href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029">More...</a><br /></td></tr>
<tr class="separator:aac1ce2a0e1010d7e9a759587e708d029"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab57bf7a057776c9efaf98720788359df"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1BytesTrie.html">BytesTrie</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1BytesTrieBuilder.html#ab57bf7a057776c9efaf98720788359df">build</a> (<a class="el" href="stringtriebuilder_8h.html#ab557ad2f18077945b8b81cf44a9233e5">UStringTrieBuildOption</a> buildOption, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;errorCode)</td></tr>
<tr class="memdesc:ab57bf7a057776c9efaf98720788359df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builds a <a class="el" href="classicu_1_1BytesTrie.html" title="Light-weight, non-const reader class for a BytesTrie.">BytesTrie</a> for the <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed data.  <a href="classicu_1_1BytesTrieBuilder.html#ab57bf7a057776c9efaf98720788359df">More...</a><br /></td></tr>
<tr class="separator:ab57bf7a057776c9efaf98720788359df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dc5080052f771043674930eae602f60"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1StringPiece.html">StringPiece</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1BytesTrieBuilder.html#a2dc5080052f771043674930eae602f60">buildStringPiece</a> (<a class="el" href="stringtriebuilder_8h.html#ab557ad2f18077945b8b81cf44a9233e5">UStringTrieBuildOption</a> buildOption, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;errorCode)</td></tr>
<tr class="memdesc:a2dc5080052f771043674930eae602f60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builds a <a class="el" href="classicu_1_1BytesTrie.html" title="Light-weight, non-const reader class for a BytesTrie.">BytesTrie</a> for the <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed data and byte-serializes it.  <a href="classicu_1_1BytesTrieBuilder.html#a2dc5080052f771043674930eae602f60">More...</a><br /></td></tr>
<tr class="separator:a2dc5080052f771043674930eae602f60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c5f137a4252940e436f1483acff825b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1BytesTrieBuilder.html">BytesTrieBuilder</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1BytesTrieBuilder.html#a9c5f137a4252940e436f1483acff825b">clear</a> ()</td></tr>
<tr class="memdesc:a9c5f137a4252940e436f1483acff825b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes all (byte sequence, value) pairs.  <a href="classicu_1_1BytesTrieBuilder.html#a9c5f137a4252940e436f1483acff825b">More...</a><br /></td></tr>
<tr class="separator:a9c5f137a4252940e436f1483acff825b"><td class="memSeparator" colspan="2">&#160;</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:af14dbed26f3ba3c9c0f19215dcd807c0"><td class="memItemLeft" align="right" valign="top"><a id="af14dbed26f3ba3c9c0f19215dcd807c0"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>::BytesTrieTest</b></td></tr>
<tr class="separator:af14dbed26f3ba3c9c0f19215dcd807c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Builder class for <a class="el" href="classicu_1_1BytesTrie.html" title="Light-weight, non-const reader class for a BytesTrie.">BytesTrie</a>. </p>
<p>This class is not intended for public subclassing. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000098">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

<p class="definition">Definition at line <a class="el" href="bytestriebuilder_8h_source.html#l00045">45</a> of file <a class="el" href="bytestriebuilder_8h_source.html">bytestriebuilder.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a36f4bdebf1028359705ca1467da7bf2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36f4bdebf1028359705ca1467da7bf2e">&#9670;&nbsp;</a></span>BytesTrieBuilder()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">icu::BytesTrieBuilder::BytesTrieBuilder </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>errorCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructs an empty builder. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">errorCode</td><td>Standard ICU error code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000099">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual icu::BytesTrieBuilder::~BytesTrieBuilder </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000100">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

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

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1BytesTrieBuilder.html">BytesTrieBuilder</a>&amp; icu::BytesTrieBuilder::add </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classicu_1_1StringPiece.html">StringPiece</a>&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>errorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds a (byte sequence, value) pair. </p>
<p>The byte sequence must be unique. The bytes will be copied; the builder does not keep a reference to the input <a class="el" href="classicu_1_1StringPiece.html" title="A string-like object that points to a sized piece of memory.">StringPiece</a> or its data(). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>The input byte sequence. </td></tr>
    <tr><td class="paramname">value</td><td>The value associated with this byte sequence. </td></tr>
    <tr><td class="paramname">errorCode</td><td>Standard ICU error code. Its input value must pass the <a class="el" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success?">U_SUCCESS()</a> test, or else the function returns immediately. Check for <a class="el" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f" title="Does the error code indicate a failure?">U_FAILURE()</a> on output or use with function chaining. (See User Guide for details.) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>*this </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000101">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

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

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1BytesTrie.html">BytesTrie</a>* icu::BytesTrieBuilder::build </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stringtriebuilder_8h.html#ab557ad2f18077945b8b81cf44a9233e5">UStringTrieBuildOption</a>&#160;</td>
          <td class="paramname"><em>buildOption</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>errorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Builds a <a class="el" href="classicu_1_1BytesTrie.html" title="Light-weight, non-const reader class for a BytesTrie.">BytesTrie</a> for the <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed data. </p>
<p>Once built, no further data can be <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed until <a class="el" href="classicu_1_1BytesTrieBuilder.html#a9c5f137a4252940e436f1483acff825b" title="Removes all (byte sequence, value) pairs.">clear()</a> is called.</p>
<p>A <a class="el" href="classicu_1_1BytesTrie.html" title="Light-weight, non-const reader class for a BytesTrie.">BytesTrie</a> cannot be empty. At least one (byte sequence, value) pair must have been <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed.</p>
<p>This method passes ownership of the builder's internal result array to the new trie object. Another call to any <a class="el" href="classicu_1_1BytesTrieBuilder.html#ab57bf7a057776c9efaf98720788359df" title="Builds a BytesTrie for the add()ed data.">build()</a> variant will re-serialize the trie. After <a class="el" href="classicu_1_1BytesTrieBuilder.html#a9c5f137a4252940e436f1483acff825b" title="Removes all (byte sequence, value) pairs.">clear()</a> has been called, a new array will be used as well. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buildOption</td><td>Build option, see UStringTrieBuildOption. </td></tr>
    <tr><td class="paramname">errorCode</td><td>Standard ICU error code. Its input value must pass the <a class="el" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success?">U_SUCCESS()</a> test, or else the function returns immediately. Check for <a class="el" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f" title="Does the error code indicate a failure?">U_FAILURE()</a> on output or use with function chaining. (See User Guide for details.) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new <a class="el" href="classicu_1_1BytesTrie.html" title="Light-weight, non-const reader class for a BytesTrie.">BytesTrie</a> for the <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed data. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000102">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

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

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1StringPiece.html">StringPiece</a> icu::BytesTrieBuilder::buildStringPiece </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stringtriebuilder_8h.html#ab557ad2f18077945b8b81cf44a9233e5">UStringTrieBuildOption</a>&#160;</td>
          <td class="paramname"><em>buildOption</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>errorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Builds a <a class="el" href="classicu_1_1BytesTrie.html" title="Light-weight, non-const reader class for a BytesTrie.">BytesTrie</a> for the <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed data and byte-serializes it. </p>
<p>Once built, no further data can be <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed until <a class="el" href="classicu_1_1BytesTrieBuilder.html#a9c5f137a4252940e436f1483acff825b" title="Removes all (byte sequence, value) pairs.">clear()</a> is called.</p>
<p>A <a class="el" href="classicu_1_1BytesTrie.html" title="Light-weight, non-const reader class for a BytesTrie.">BytesTrie</a> cannot be empty. At least one (byte sequence, value) pair must have been <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed.</p>
<p>Multiple calls to <a class="el" href="classicu_1_1BytesTrieBuilder.html#a2dc5080052f771043674930eae602f60" title="Builds a BytesTrie for the add()ed data and byte-serializes it.">buildStringPiece()</a> return StringPieces referring to the builder's same byte array, without rebuilding. If <a class="el" href="classicu_1_1BytesTrieBuilder.html#a2dc5080052f771043674930eae602f60" title="Builds a BytesTrie for the add()ed data and byte-serializes it.">buildStringPiece()</a> is called after <a class="el" href="classicu_1_1BytesTrieBuilder.html#ab57bf7a057776c9efaf98720788359df" title="Builds a BytesTrie for the add()ed data.">build()</a>, the trie will be re-serialized into a new array (because <a class="el" href="classicu_1_1BytesTrieBuilder.html#ab57bf7a057776c9efaf98720788359df" title="Builds a BytesTrie for the add()ed data.">build()</a> passes on ownership). If <a class="el" href="classicu_1_1BytesTrieBuilder.html#ab57bf7a057776c9efaf98720788359df" title="Builds a BytesTrie for the add()ed data.">build()</a> is called after <a class="el" href="classicu_1_1BytesTrieBuilder.html#a2dc5080052f771043674930eae602f60" title="Builds a BytesTrie for the add()ed data and byte-serializes it.">buildStringPiece()</a>, the trie object returned by <a class="el" href="classicu_1_1BytesTrieBuilder.html#ab57bf7a057776c9efaf98720788359df" title="Builds a BytesTrie for the add()ed data.">build()</a> will become the owner of the underlying string for the previously returned <a class="el" href="classicu_1_1StringPiece.html" title="A string-like object that points to a sized piece of memory.">StringPiece</a>. After <a class="el" href="classicu_1_1BytesTrieBuilder.html#a9c5f137a4252940e436f1483acff825b" title="Removes all (byte sequence, value) pairs.">clear()</a> has been called, a new array will be used as well. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buildOption</td><td>Build option, see UStringTrieBuildOption. </td></tr>
    <tr><td class="paramname">errorCode</td><td>Standard ICU error code. Its input value must pass the <a class="el" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success?">U_SUCCESS()</a> test, or else the function returns immediately. Check for <a class="el" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f" title="Does the error code indicate a failure?">U_FAILURE()</a> on output or use with function chaining. (See User Guide for details.) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="classicu_1_1StringPiece.html" title="A string-like object that points to a sized piece of memory.">StringPiece</a> which refers to the byte-serialized <a class="el" href="classicu_1_1BytesTrie.html" title="Light-weight, non-const reader class for a BytesTrie.">BytesTrie</a> for the <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed data. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000103">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

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

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1BytesTrieBuilder.html">BytesTrieBuilder</a>&amp; icu::BytesTrieBuilder::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes all (byte sequence, value) pairs. </p>
<p>New data can then be <a class="el" href="classicu_1_1BytesTrieBuilder.html#aac1ce2a0e1010d7e9a759587e708d029" title="Adds a (byte sequence, value) pair.">add()</a>ed and a new trie can be built. </p><dl class="section return"><dt>Returns</dt><dd>*this </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000104">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>common/unicode/<a class="el" href="bytestriebuilder_8h_source.html">bytestriebuilder.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
Back to Directory=ceiIENDB`