HEX
Server: LiteSpeed
System: Linux s3604.bom1.stableserver.net 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: dmstechonline (1480)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //opt/alt/alt-nodejs24/root/usr/share/doc/alt-nodejs24-libicu-doc/classBytesTrieBuilder.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 77.1: 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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ICU 77.1
   &#160;<span id="projectnumber">77.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

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

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="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" usemap="#icu::BytesTrieBuilder_map" alt=""/>
  <map id="icu::BytesTrieBuilder_map" name="icu::BytesTrieBuilder_map">
</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: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="#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="#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="#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="#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="#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="#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="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>