D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
alt-nodejs24
/
root
/
usr
/
share
/
doc
/
alt-nodejs24-libicu-doc
/
Filename :
classUCharsTrieBuilder.html
back
Copy
<!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 77.1: icu::UCharsTrieBuilder 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  <span id="projectnumber">77.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.9.1 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search','.html'); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); /* @license-end */</script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceicu.html">icu</a></li><li class="navelem"><a class="el" href="classicu_1_1UCharsTrieBuilder.html">UCharsTrieBuilder</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#nested-classes">Data Structures</a> | <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">icu::UCharsTrieBuilder Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>Builder class for <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie.">UCharsTrie</a>. <a href="classicu_1_1UCharsTrieBuilder.html#details">More...</a></p> <p><code>#include <<a class="el" href="ucharstriebuilder_8h_source.html">ucharstriebuilder.h</a>></code></p> <div class="dynheader"> Inheritance diagram for icu::UCharsTrieBuilder:</div> <div class="dyncontent"> <div class="center"> <img src="classicu_1_1UCharsTrieBuilder.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:ab4c60265c2c0dac82d36c7c2a747cd87"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrieBuilder.html#ab4c60265c2c0dac82d36c7c2a747cd87">UCharsTrieBuilder</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &errorCode)</td></tr> <tr class="memdesc:ab4c60265c2c0dac82d36c7c2a747cd87"><td class="mdescLeft"> </td><td class="mdescRight">Constructs an empty builder. <a href="classicu_1_1UCharsTrieBuilder.html#ab4c60265c2c0dac82d36c7c2a747cd87">More...</a><br /></td></tr> <tr class="separator:ab4c60265c2c0dac82d36c7c2a747cd87"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a53181ee97947f5c6c01a459a466f63f5"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrieBuilder.html#a53181ee97947f5c6c01a459a466f63f5">~UCharsTrieBuilder</a> ()</td></tr> <tr class="memdesc:a53181ee97947f5c6c01a459a466f63f5"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="classicu_1_1UCharsTrieBuilder.html#a53181ee97947f5c6c01a459a466f63f5">More...</a><br /></td></tr> <tr class="separator:a53181ee97947f5c6c01a459a466f63f5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae24699b9f1b70421730dc090679ee9b9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UCharsTrieBuilder.html">UCharsTrieBuilder</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9">add</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &s, int32_t value, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &errorCode)</td></tr> <tr class="memdesc:ae24699b9f1b70421730dc090679ee9b9"><td class="mdescLeft"> </td><td class="mdescRight">Adds a (string, value) pair. <a href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9">More...</a><br /></td></tr> <tr class="separator:ae24699b9f1b70421730dc090679ee9b9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a462a83b45bacfe4c871d20010d0634c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UCharsTrie.html">UCharsTrie</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrieBuilder.html#a462a83b45bacfe4c871d20010d0634c7">build</a> (<a class="el" href="stringtriebuilder_8h.html#ab557ad2f18077945b8b81cf44a9233e5">UStringTrieBuildOption</a> buildOption, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &errorCode)</td></tr> <tr class="memdesc:a462a83b45bacfe4c871d20010d0634c7"><td class="mdescLeft"> </td><td class="mdescRight">Builds a <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie.">UCharsTrie</a> for the <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, value) pair.">add()</a>ed data. <a href="classicu_1_1UCharsTrieBuilder.html#a462a83b45bacfe4c871d20010d0634c7">More...</a><br /></td></tr> <tr class="separator:a462a83b45bacfe4c871d20010d0634c7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6f709b374ac2c0ab1b78432ce1c4671b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrieBuilder.html#a6f709b374ac2c0ab1b78432ce1c4671b">buildUnicodeString</a> (<a class="el" href="stringtriebuilder_8h.html#ab557ad2f18077945b8b81cf44a9233e5">UStringTrieBuildOption</a> buildOption, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &result, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &errorCode)</td></tr> <tr class="memdesc:a6f709b374ac2c0ab1b78432ce1c4671b"><td class="mdescLeft"> </td><td class="mdescRight">Builds a <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie.">UCharsTrie</a> for the <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, value) pair.">add()</a>ed data and char16_t-serializes it. <a href="classicu_1_1UCharsTrieBuilder.html#a6f709b374ac2c0ab1b78432ce1c4671b">More...</a><br /></td></tr> <tr class="separator:a6f709b374ac2c0ab1b78432ce1c4671b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab822980134acce480395639e1f1ab3e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UCharsTrieBuilder.html">UCharsTrieBuilder</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrieBuilder.html#ab822980134acce480395639e1f1ab3e5">clear</a> ()</td></tr> <tr class="memdesc:ab822980134acce480395639e1f1ab3e5"><td class="mdescLeft"> </td><td class="mdescRight">Removes all (string, value) pairs. <a href="classicu_1_1UCharsTrieBuilder.html#ab822980134acce480395639e1f1ab3e5">More...</a><br /></td></tr> <tr class="separator:ab822980134acce480395639e1f1ab3e5"><td class="memSeparator" colspan="2"> </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_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie.">UCharsTrie</a>. </p> <p>This class is not intended for public subclassing. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable001825">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> <p class="definition">Definition at line <a class="el" href="ucharstriebuilder_8h_source.html#l00043">43</a> of file <a class="el" href="ucharstriebuilder_8h_source.html">ucharstriebuilder.h</a>.</p> </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> <a id="ab4c60265c2c0dac82d36c7c2a747cd87"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab4c60265c2c0dac82d36c7c2a747cd87">◆ </a></span>UCharsTrieBuilder()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">icu::UCharsTrieBuilder::UCharsTrieBuilder </td> <td>(</td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </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#_stable001826">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <a id="a53181ee97947f5c6c01a459a466f63f5"></a> <h2 class="memtitle"><span class="permalink"><a href="#a53181ee97947f5c6c01a459a466f63f5">◆ </a></span>~UCharsTrieBuilder()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual icu::UCharsTrieBuilder::~UCharsTrieBuilder </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#_stable001827">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a id="ae24699b9f1b70421730dc090679ee9b9"></a> <h2 class="memtitle"><span class="permalink"><a href="#ae24699b9f1b70421730dc090679ee9b9">◆ </a></span>add()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classicu_1_1UCharsTrieBuilder.html">UCharsTrieBuilder</a>& icu::UCharsTrieBuilder::add </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </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> & </td> <td class="paramname"><em>errorCode</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Adds a (string, value) pair. </p> <p>The string must be unique. The string contents will be copied; the builder does not keep a reference to the input <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> or its buffer. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">s</td><td>The input string. </td></tr> <tr><td class="paramname">value</td><td>The value associated with this string. </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#_stable001828">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <a id="a462a83b45bacfe4c871d20010d0634c7"></a> <h2 class="memtitle"><span class="permalink"><a href="#a462a83b45bacfe4c871d20010d0634c7">◆ </a></span>build()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classicu_1_1UCharsTrie.html">UCharsTrie</a>* icu::UCharsTrieBuilder::build </td> <td>(</td> <td class="paramtype"><a class="el" href="stringtriebuilder_8h.html#ab557ad2f18077945b8b81cf44a9233e5">UStringTrieBuildOption</a> </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> & </td> <td class="paramname"><em>errorCode</em> </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_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie.">UCharsTrie</a> for the <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, value) pair.">add()</a>ed data. </p> <p>Once built, no further data can be <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, value) pair.">add()</a>ed until <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ab822980134acce480395639e1f1ab3e5" title="Removes all (string, value) pairs.">clear()</a> is called.</p> <p>A <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie.">UCharsTrie</a> cannot be empty. At least one (string, value) pair must have been <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, 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_1UCharsTrieBuilder.html#a462a83b45bacfe4c871d20010d0634c7" title="Builds a UCharsTrie for the add()ed data.">build()</a> variant will re-serialize the trie. After <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ab822980134acce480395639e1f1ab3e5" title="Removes all (string, 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_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie.">UCharsTrie</a> for the <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, value) pair.">add()</a>ed data. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001829">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <a id="a6f709b374ac2c0ab1b78432ce1c4671b"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6f709b374ac2c0ab1b78432ce1c4671b">◆ </a></span>buildUnicodeString()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>& icu::UCharsTrieBuilder::buildUnicodeString </td> <td>(</td> <td class="paramtype"><a class="el" href="stringtriebuilder_8h.html#ab557ad2f18077945b8b81cf44a9233e5">UStringTrieBuildOption</a> </td> <td class="paramname"><em>buildOption</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>result</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>errorCode</em> </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_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie.">UCharsTrie</a> for the <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, value) pair.">add()</a>ed data and char16_t-serializes it. </p> <p>Once built, no further data can be <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, value) pair.">add()</a>ed until <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ab822980134acce480395639e1f1ab3e5" title="Removes all (string, value) pairs.">clear()</a> is called.</p> <p>A <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie.">UCharsTrie</a> cannot be empty. At least one (string, value) pair must have been <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, value) pair.">add()</a>ed.</p> <p>Multiple calls to <a class="el" href="classicu_1_1UCharsTrieBuilder.html#a6f709b374ac2c0ab1b78432ce1c4671b" title="Builds a UCharsTrie for the add()ed data and char16_t-serializes it.">buildUnicodeString()</a> set the UnicodeStrings to the builder's same char16_t array, without rebuilding. If <a class="el" href="classicu_1_1UCharsTrieBuilder.html#a6f709b374ac2c0ab1b78432ce1c4671b" title="Builds a UCharsTrie for the add()ed data and char16_t-serializes it.">buildUnicodeString()</a> is called after <a class="el" href="classicu_1_1UCharsTrieBuilder.html#a462a83b45bacfe4c871d20010d0634c7" title="Builds a UCharsTrie for the add()ed data.">build()</a>, the trie will be re-serialized into a new array (because <a class="el" href="classicu_1_1UCharsTrieBuilder.html#a462a83b45bacfe4c871d20010d0634c7" title="Builds a UCharsTrie for the add()ed data.">build()</a> passes on ownership). If <a class="el" href="classicu_1_1UCharsTrieBuilder.html#a462a83b45bacfe4c871d20010d0634c7" title="Builds a UCharsTrie for the add()ed data.">build()</a> is called after <a class="el" href="classicu_1_1UCharsTrieBuilder.html#a6f709b374ac2c0ab1b78432ce1c4671b" title="Builds a UCharsTrie for the add()ed data and char16_t-serializes it.">buildUnicodeString()</a>, the trie object returned by <a class="el" href="classicu_1_1UCharsTrieBuilder.html#a462a83b45bacfe4c871d20010d0634c7" title="Builds a UCharsTrie for the add()ed data.">build()</a> will become the owner of the underlying data for the previously returned <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>. After <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ab822980134acce480395639e1f1ab3e5" title="Removes all (string, 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">result</td><td>A <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> which will be set to the char16_t-serialized <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie.">UCharsTrie</a> for the <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, value) pair.">add()</a>ed data. </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>result </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001830">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <a id="ab822980134acce480395639e1f1ab3e5"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab822980134acce480395639e1f1ab3e5">◆ </a></span>clear()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classicu_1_1UCharsTrieBuilder.html">UCharsTrieBuilder</a>& icu::UCharsTrieBuilder::clear </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></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>Removes all (string, value) pairs. </p> <p>New data can then be <a class="el" href="classicu_1_1UCharsTrieBuilder.html#ae24699b9f1b70421730dc090679ee9b9" title="Adds a (string, 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#_stable001831">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> <p class="definition">Definition at line <a class="el" href="ucharstriebuilder_8h_source.html#l00128">128</a> of file <a class="el" href="ucharstriebuilder_8h_source.html">ucharstriebuilder.h</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>common/unicode/<a class="el" href="ucharstriebuilder_8h_source.html">ucharstriebuilder.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by <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>