Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > 64656f00434e190abe8506174ca339ed > files > 587

ucommon-doc-4.3.1-1.mga1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ucommon: UString Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ucommon</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00168.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<h1>UString Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="UString" --><!-- doxytag: inherits="string,utf8" -->
<p>A copy-on-write <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> string class that operates by reference count.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00203_source.html">unicode.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for UString:</div>
<div class="dyncontent">
<div class="center"><img src="a00499.png" border="0" usemap="#_u_string_inherit__map" alt="Inheritance graph"/></div>
<map name="_u_string_inherit__map" id="_u_string_inherit__map">
<area shape="rect" id="node2" href="a00150.html" title="A copy&#45;on&#45;write string class that operates by reference count." alt="" coords="5,80,88,107"/><area shape="rect" id="node4" href="a00091.html" title="A common base class for all managed objects." alt="" coords="5,5,88,32"/><area shape="rect" id="node6" href="a00169.html" title="A core class of ut8 encoded string functions." alt="" coords="112,80,173,107"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for UString:</div>
<div class="dyncontent">
<div class="center"><img src="a00500.png" border="0" usemap="#_u_string_coll__map" alt="Collaboration graph"/></div>
<map name="_u_string_coll__map" id="_u_string_coll__map">
<area shape="rect" id="node2" href="a00150.html" title="A copy&#45;on&#45;write string class that operates by reference count." alt="" coords="5,251,88,277"/><area shape="rect" id="node4" href="a00091.html" title="A common base class for all managed objects." alt="" coords="21,5,104,32"/><area shape="rect" id="node8" href="a00037.html" title="A base class for reference counted objects." alt="" coords="65,83,217,109"/><area shape="rect" id="node6" href="a00151.html" title="This is an internal class which contains the actual string data along with some control fields..." alt="" coords="63,160,233,187"/><area shape="rect" id="node11" href="a00169.html" title="A core class of ut8 encoded string functions." alt="" coords="112,251,173,277"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a4e0428b31875d213cdc6c15331901f37">add</a> (const <a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a> unicode)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add (append) unicode to a <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> encoded string.  <a href="#a4e0428b31875d213cdc6c15331901f37"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00203.html#aa65b6d81ad7e736d1997f46c0a9f5807">ucs4_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#af7789f4b76ce48c1d2a95f0df640047f">at</a> (int position) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return unicode character found at a specific codepoint in the string.  <a href="#af7789f4b76ce48c1d2a95f0df640047f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#ab159a863fb50ac755f3083ac0557958c">ccount</a> (<a class="el" href="a00203.html#aa65b6d81ad7e736d1997f46c0a9f5807">ucs4_t</a> character) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Count occurrences of a unicode character in string.  <a href="#ab159a863fb50ac755f3083ac0557958c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a5cf3d7df942aeec4f17b4d33abdc15f3">count</a> (void) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Count codepoints in current string.  <a href="#a5cf3d7df942aeec4f17b4d33abdc15f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#af143bc79fb78a43eec2b0b7cd5fd4a13">find</a> (<a class="el" href="a00203.html#aa65b6d81ad7e736d1997f46c0a9f5807">ucs4_t</a> character, <a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a> start=0) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Find first occurrence of character in string.  <a href="#af143bc79fb78a43eec2b0b7cd5fd4a13"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html">UString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a96917868ec3cda5985329e6ac961af5a">get</a> (<a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a> codepoint, <a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a> size=0) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a new string object as a substring of the current object.  <a href="#a96917868ec3cda5985329e6ac961af5a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a7adfee2a25d11c42172a697d14fa47fe">get</a> (<a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a> unicode, size_t size) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Extract a unicode byte sequence from <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> object.  <a href="#a7adfee2a25d11c42172a697d14fa47fe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a3e98c984eac23b695e8cafcd47269168">operator()</a> (int offset) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference a string in the object by codepoint offset.  <a href="#a3e98c984eac23b695e8cafcd47269168"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a7cd17cfb8dd4921de12fa1e20ee727c8">operator()</a> (<a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a> unicode, size_t size) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Extract a unicode byte sequence from <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> object.  <a href="#a7cd17cfb8dd4921de12fa1e20ee727c8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html">UString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a5298accc76ede8af806e94ff5772fd4b">operator()</a> (int codepoint, <a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a> size) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a new substring through object expression.  <a href="#a5298accc76ede8af806e94ff5772fd4b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00203.html#aa65b6d81ad7e736d1997f46c0a9f5807">ucs4_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a011125da2d82084b6a84aa0c2e9cc4f3">operator[]</a> (int position) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference a unicode character in string object by array offset.  <a href="#a011125da2d82084b6a84aa0c2e9cc4f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a6cc0d081512e11d57a7a5d7aca666b74">rfind</a> (<a class="el" href="a00203.html#aa65b6d81ad7e736d1997f46c0a9f5807">ucs4_t</a> character, <a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a> end=<a class="el" href="a00150.html#a765f030f9df14a94d38d8b6a22a46c86">npos</a>) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Find last occurrence of character in string.  <a href="#a6cc0d081512e11d57a7a5d7aca666b74"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a79f890051464938b38fe0b5ca5087b6f">set</a> (const <a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a> unicode)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> encoded string based on unicode data.  <a href="#a79f890051464938b38fe0b5ca5087b6f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a7c1524abfcd3ebbe3330f13ffe8d4d07">UString</a> (<a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a> size)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty string with a buffer pre-allocated to a specified size.  <a href="#a7c1524abfcd3ebbe3330f13ffe8d4d07"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a20200bbca9e6c264533a359612c3dbc7">UString</a> (const <a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a> text)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> aware string for a null terminated unicode string.  <a href="#a20200bbca9e6c264533a359612c3dbc7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#ab32bedf0b769c3241525f498e0f74889">UString</a> (const <a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a> *text, const <a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a> *end)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a string for a substring.  <a href="#ab32bedf0b769c3241525f498e0f74889"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a548b0420afbf100f600f28c8080964bd">UString</a> (const char *text, <a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a> size)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a string from null terminated text up to a maximum specified size.  <a href="#a548b0420afbf100f600f28c8080964bd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6bff2ea822acdda7aa6203a31e2de5e9"></a><!-- doxytag: member="UString::UString" ref="a6bff2ea822acdda7aa6203a31e2de5e9" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a6bff2ea822acdda7aa6203a31e2de5e9">UString</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new empty <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> aware string object. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a1d7c9ec2a86663c70820730ff37c49cd">UString</a> (const <a class="el" href="a00168.html">UString</a> &amp;existing)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a copy of a string object.  <a href="#a1d7c9ec2a86663c70820730ff37c49cd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a89aa35a725d051d48a566e03f5a96be3">~UString</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy string.  <a href="#a89aa35a725d051d48a566e03f5a96be3"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A copy-on-write <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> string class that operates by reference count. </p>
<p>This is derived from the classic uCommon String class by adding operations that are <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> encoding aware. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="a00203_source.html#l00183">183</a> of file <a class="el" href="a00203_source.html">unicode.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7c1524abfcd3ebbe3330f13ffe8d4d07"></a><!-- doxytag: member="UString::UString" ref="a7c1524abfcd3ebbe3330f13ffe8d4d07" args="(strsize_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UString::UString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a>&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create an empty string with a buffer pre-allocated to a specified size. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>of buffer to allocate. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a20200bbca9e6c264533a359612c3dbc7"></a><!-- doxytag: member="UString::UString" ref="a20200bbca9e6c264533a359612c3dbc7" args="(const unicode_t text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UString::UString </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a>&#160;</td>
          <td class="paramname"><em>text</em></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> aware string for a null terminated unicode string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>of ucs4 encoded data. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a548b0420afbf100f600f28c8080964bd"></a><!-- doxytag: member="UString::UString" ref="a548b0420afbf100f600f28c8080964bd" args="(const char *text, strsize_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UString::UString </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a>&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a string from null terminated text up to a maximum specified size. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>to use for string. </td></tr>
    <tr><td class="paramname">size</td><td>limit of new string. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab32bedf0b769c3241525f498e0f74889"></a><!-- doxytag: member="UString::UString" ref="ab32bedf0b769c3241525f498e0f74889" args="(const unicode_t *text, const unicode_t *end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UString::UString </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a> *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a> *&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a string for a substring. </p>
<p>The end of the substring is a pointer within the substring itself. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>to use for string. </td></tr>
    <tr><td class="paramname">end</td><td>of text in substring. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1d7c9ec2a86663c70820730ff37c49cd"></a><!-- doxytag: member="UString::UString" ref="a1d7c9ec2a86663c70820730ff37c49cd" args="(const UString &amp;existing)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UString::UString </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00168.html">UString</a> &amp;&#160;</td>
          <td class="paramname"><em>existing</em></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct a copy of a string object. </p>
<p>Our copy inherits the same reference counted instance of cstring as in the original. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">existing</td><td>string to copy from. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a89aa35a725d051d48a566e03f5a96be3"></a><!-- doxytag: member="UString::~UString" ref="a89aa35a725d051d48a566e03f5a96be3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual UString::~UString </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroy string. </p>
<p>De-reference cstring. If last reference to cstring, then also remove cstring from heap. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a4e0428b31875d213cdc6c15331901f37"></a><!-- doxytag: member="UString::add" ref="a4e0428b31875d213cdc6c15331901f37" args="(const unicode_t unicode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UString::add </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a>&#160;</td>
          <td class="paramname"><em>unicode</em></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add (append) unicode to a <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> encoded string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">unicode</td><td>text to add. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af7789f4b76ce48c1d2a95f0df640047f"></a><!-- doxytag: member="UString::at" ref="af7789f4b76ce48c1d2a95f0df640047f" args="(int position) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00203.html#aa65b6d81ad7e736d1997f46c0a9f5807">ucs4_t</a> UString::at </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>position</em></td><td>)</td>
          <td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return unicode character found at a specific codepoint in the string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">position</td><td>of codepoint in string, negative values computed from end. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>character code at specified position in string. </dd></dl>

<p>Reimplemented from <a class="el" href="a00150.html#ac37f86810f4685700557262b6bf3683b">string</a>.</p>

</div>
</div>
<a class="anchor" id="ab159a863fb50ac755f3083ac0557958c"></a><!-- doxytag: member="UString::ccount" ref="ab159a863fb50ac755f3083ac0557958c" args="(ucs4_t character) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned UString::ccount </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00203.html#aa65b6d81ad7e736d1997f46c0a9f5807">ucs4_t</a>&#160;</td>
          <td class="paramname"><em>character</em></td><td>)</td>
          <td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Count occurrences of a unicode character in string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">character</td><td>code to search for. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>count of occurrences. </dd></dl>

</div>
</div>
<a class="anchor" id="a5cf3d7df942aeec4f17b4d33abdc15f3"></a><!-- doxytag: member="UString::count" ref="a5cf3d7df942aeec4f17b4d33abdc15f3" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a> UString::count </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Count codepoints in current string. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>count of codepoints. </dd></dl>

<p>Reimplemented from <a class="el" href="a00150.html#a24e16e0315825b60f7e212c950474f82">string</a>.</p>

<p>Definition at line <a class="el" href="a00203_source.html#l00305">305</a> of file <a class="el" href="a00203_source.html">unicode.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="a00168_a5cf3d7df942aeec4f17b4d33abdc15f3_cgraph.png" border="0" usemap="#a00168_a5cf3d7df942aeec4f17b4d33abdc15f3_cgraph" alt=""/></div>
<map name="a00168_a5cf3d7df942aeec4f17b4d33abdc15f3_cgraph" id="a00168_a5cf3d7df942aeec4f17b4d33abdc15f3_cgraph">
<area shape="rect" id="node3" href="a00169.html#a47b2778d64cf8dde592b5f6723bcde95" title="Count ut8 encoded ucs4 codepoints in string." alt="" coords="217,5,348,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="af143bc79fb78a43eec2b0b7cd5fd4a13"></a><!-- doxytag: member="UString::find" ref="af143bc79fb78a43eec2b0b7cd5fd4a13" args="(ucs4_t character, strsize_t start=0) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* UString::find </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00203.html#aa65b6d81ad7e736d1997f46c0a9f5807">ucs4_t</a>&#160;</td>
          <td class="paramname"><em>character</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a>&#160;</td>
          <td class="paramname"><em>start</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Find first occurrence of character in string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">character</td><td>code to search for. </td></tr>
    <tr><td class="paramname">start</td><td>offset in string in codepoints. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to first instance or NULL if not found. </dd></dl>

</div>
</div>
<a class="anchor" id="a7adfee2a25d11c42172a697d14fa47fe"></a><!-- doxytag: member="UString::get" ref="a7adfee2a25d11c42172a697d14fa47fe" args="(unicode_t unicode, size_t size) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t UString::get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a>&#160;</td>
          <td class="paramname"><em>unicode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Extract a unicode byte sequence from <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">unicode</td><td>data buffer. </td></tr>
    <tr><td class="paramname">size</td><td>of data buffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>codepoints copied. </dd></dl>

</div>
</div>
<a class="anchor" id="a96917868ec3cda5985329e6ac961af5a"></a><!-- doxytag: member="UString::get" ref="a96917868ec3cda5985329e6ac961af5a" args="(strsize_t codepoint, strsize_t size=0) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00168.html">UString</a> UString::get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a>&#160;</td>
          <td class="paramname"><em>codepoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a>&#160;</td>
          <td class="paramname"><em>size</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a new string object as a substring of the current object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">codepoint</td><td>offset of substring. </td></tr>
    <tr><td class="paramname">size</td><td>of substring in codepoints or 0 if to end. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>string object holding substring. </dd></dl>

<p>Reimplemented from <a class="el" href="a00150.html#aa381d3159d76ae317929a2f0cde86fdd">string</a>.</p>

</div>
</div>
<a class="anchor" id="a5298accc76ede8af806e94ff5772fd4b"></a><!-- doxytag: member="UString::operator()" ref="a5298accc76ede8af806e94ff5772fd4b" args="(int codepoint, strsize_t size) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00168.html">UString</a> UString::operator() </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>codepoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a>&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a new substring through object expression. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">codepoint</td><td>offset of substring. </td></tr>
    <tr><td class="paramname">size</td><td>of substring or 0 if to end. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>string object holding substring. </dd></dl>

<p>Reimplemented from <a class="el" href="a00150.html#a9dfe30deef0a245f8bdac9a3ac319a0b">string</a>.</p>

</div>
</div>
<a class="anchor" id="a3e98c984eac23b695e8cafcd47269168"></a><!-- doxytag: member="UString::operator()" ref="a3e98c984eac23b695e8cafcd47269168" args="(int offset) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* UString::operator() </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>offset</em></td><td>)</td>
          <td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reference a string in the object by codepoint offset. </p>
<p>Positive offsets are from the start of the string, negative from the end. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">offset</td><td>to string position. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to string data or NULL if invalid offset. </dd></dl>

<p>Reimplemented from <a class="el" href="a00150.html#abb544e7605c5f13c9915de679d22a399">string</a>.</p>

</div>
</div>
<a class="anchor" id="a7cd17cfb8dd4921de12fa1e20ee727c8"></a><!-- doxytag: member="UString::operator()" ref="a7cd17cfb8dd4921de12fa1e20ee727c8" args="(unicode_t unicode, size_t size) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t UString::operator() </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a>&#160;</td>
          <td class="paramname"><em>unicode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Extract a unicode byte sequence from <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">unicode</td><td>data buffer. </td></tr>
    <tr><td class="paramname">size</td><td>of data buffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>codepoints copied. </dd></dl>

<p>Definition at line <a class="el" href="a00203_source.html#l00273">273</a> of file <a class="el" href="a00203_source.html">unicode.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="a00168_a7cd17cfb8dd4921de12fa1e20ee727c8_cgraph.png" border="0" usemap="#a00168_a7cd17cfb8dd4921de12fa1e20ee727c8_cgraph" alt=""/></div>
<map name="a00168_a7cd17cfb8dd4921de12fa1e20ee727c8_cgraph" id="a00168_a7cd17cfb8dd4921de12fa1e20ee727c8_cgraph">
<area shape="rect" id="node3" href="a00150.html#a65a849edef072f46213d55b9f339f91b" title="Get the size of currently allocated space for string." alt="" coords="268,5,409,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a011125da2d82084b6a84aa0c2e9cc4f3"></a><!-- doxytag: member="UString::operator[]" ref="a011125da2d82084b6a84aa0c2e9cc4f3" args="(int position) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00203.html#aa65b6d81ad7e736d1997f46c0a9f5807">ucs4_t</a> UString::operator[] </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>position</em></td><td>)</td>
          <td> const<code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reference a unicode character in string object by array offset. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">position</td><td>of codepoint offset to character. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>character value at offset. </dd></dl>

<p>Reimplemented from <a class="el" href="a00150.html#a7ee9d70b37f364de55c73e66d31dc66b">string</a>.</p>

<p>Definition at line <a class="el" href="a00203_source.html#l00298">298</a> of file <a class="el" href="a00203_source.html">unicode.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="a00168_a011125da2d82084b6a84aa0c2e9cc4f3_cgraph.png" border="0" usemap="#a00168_a011125da2d82084b6a84aa0c2e9cc4f3_cgraph" alt=""/></div>
<map name="a00168_a011125da2d82084b6a84aa0c2e9cc4f3_cgraph" id="a00168_a011125da2d82084b6a84aa0c2e9cc4f3_cgraph">
<area shape="rect" id="node3" href="a00168.html#af7789f4b76ce48c1d2a95f0df640047f" title="Return unicode character found at a specific codepoint in the string." alt="" coords="268,5,399,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a6cc0d081512e11d57a7a5d7aca666b74"></a><!-- doxytag: member="UString::rfind" ref="a6cc0d081512e11d57a7a5d7aca666b74" args="(ucs4_t character, strsize_t end=npos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* UString::rfind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00203.html#aa65b6d81ad7e736d1997f46c0a9f5807">ucs4_t</a>&#160;</td>
          <td class="paramname"><em>character</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00199.html#aac841dcc2b0fddb0c58aa1283c00ecb4">strsize_t</a>&#160;</td>
          <td class="paramname"><em>end</em> = <code><a class="el" href="a00150.html#a765f030f9df14a94d38d8b6a22a46c86">npos</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Find last occurrence of character in string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">character</td><td>code to search for. </td></tr>
    <tr><td class="paramname">end</td><td>offset to start from in codepoints. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to last instance or NULL if not found. </dd></dl>

</div>
</div>
<a class="anchor" id="a79f890051464938b38fe0b5ca5087b6f"></a><!-- doxytag: member="UString::set" ref="a79f890051464938b38fe0b5ca5087b6f" args="(const unicode_t unicode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UString::set </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00203.html#aaff5e9b42d3325c348e79535e7d70f59">unicode_t</a>&#160;</td>
          <td class="paramname"><em>unicode</em></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set a <a class="el" href="a00169.html" title="A core class of ut8 encoded string functions.">utf8</a> encoded string based on unicode data. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">unicode</td><td>text to set. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00203_source.html">unicode.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00168.html">UString</a>      </li>
      <li class="footer">Generated on Wed Apr 13 2011 22:39:48 for ucommon by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
    </ul>
  </div>

</body>
</html>