This file is indexed.

/usr/share/doc/libucommon-dev/a00211_source.html is in libucommon-doc 3.2.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!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: ucommon/unicode.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<h1>ucommon/unicode.h</h1><a href="a00211.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2009-2010 David Sugar, Tycho Softworks.</span>
<a name="l00002"></a>00002 <span class="comment">//</span>
<a name="l00003"></a>00003 <span class="comment">// This file is part of GNU uCommon C++.</span>
<a name="l00004"></a>00004 <span class="comment">//</span>
<a name="l00005"></a>00005 <span class="comment">// GNU uCommon C++ is free software: you can redistribute it and/or modify</span>
<a name="l00006"></a>00006 <span class="comment">// it under the terms of the GNU Lesser General Public License as published </span>
<a name="l00007"></a>00007 <span class="comment">// by the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment">// (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment">//</span>
<a name="l00010"></a>00010 <span class="comment">// GNU uCommon C++ is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment">// GNU Lesser General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment">//</span>
<a name="l00015"></a>00015 <span class="comment">// You should have received a copy of the GNU Lesser General Public License</span>
<a name="l00016"></a>00016 <span class="comment">// along with GNU uCommon C++.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00017"></a>00017 
<a name="l00032"></a>00032 <span class="preprocessor">#ifndef _UCOMMON_UNICODE_H_</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define _UCOMMON_UNICODE_H_</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#ifndef _UCOMMON_STRING_H_</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="a00207.html" title="A common string class and character string support functions.">ucommon/string.h</a>&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 NAMESPACE_UCOMMON
<a name="l00040"></a>00040 
<a name="l00045"></a><a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b">00045</a> <span class="keyword">typedef</span> int32_t <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a>;
<a name="l00046"></a>00046 
<a name="l00050"></a><a class="code" href="a00214.html#abc93c8103e4b9f2768642e0ca96a6d52">00050</a> <span class="keyword">typedef</span> int16_t <a class="code" href="a00214.html#abc93c8103e4b9f2768642e0ca96a6d52" title="16 bit unicode character code.">ucs2_t</a>;
<a name="l00051"></a>00051 
<a name="l00055"></a><a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340">00055</a> <span class="keyword">typedef</span> <span class="keywordtype">void</span> *<a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a>;
<a name="l00056"></a>00056 
<a name="l00062"></a><a class="code" href="a00178.html">00062</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00178.html" title="A core class of ut8 encoded string functions.">utf8</a>
<a name="l00063"></a>00063 {
<a name="l00064"></a>00064 <span class="keyword">public</span>:
<a name="l00068"></a><a class="code" href="a00178.html#ae5b796ab0c4c0c676127c0eb3d7fb358">00068</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> ucsize;
<a name="l00069"></a>00069 
<a name="l00073"></a><a class="code" href="a00178.html#a7725fcbdf96a056e2191b022bf1936e3">00073</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *nil;
<a name="l00074"></a>00074 
<a name="l00080"></a>00080     <span class="keyword">static</span> <span class="keywordtype">unsigned</span> size(<span class="keyword">const</span> <span class="keywordtype">char</span> *codepoint);
<a name="l00081"></a>00081 
<a name="l00087"></a>00087     <span class="keyword">static</span> <span class="keywordtype">size_t</span> count(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>);
<a name="l00088"></a>00088 
<a name="l00095"></a>00095     <span class="keyword">static</span> <span class="keywordtype">char</span> *offset(<span class="keywordtype">char</span> *<span class="keywordtype">string</span>, ssize_t position);
<a name="l00096"></a>00096 
<a name="l00102"></a>00102     <span class="keyword">static</span> <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> codepoint(<span class="keyword">const</span> <span class="keywordtype">char</span> *encoded);
<a name="l00103"></a>00103 
<a name="l00109"></a>00109     <span class="keyword">static</span> <span class="keywordtype">size_t</span> chars(<span class="keyword">const</span> <a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a> <span class="keywordtype">string</span>);
<a name="l00110"></a>00110 
<a name="l00116"></a>00116     <span class="keyword">static</span> <span class="keywordtype">size_t</span> chars(<a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> character);
<a name="l00117"></a>00117 
<a name="l00125"></a>00125     <span class="keyword">static</span> <span class="keywordtype">size_t</span> convert(<span class="keyword">const</span> <a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a> <span class="keywordtype">string</span>, <span class="keywordtype">char</span> *buffer, <span class="keywordtype">size_t</span> size);
<a name="l00126"></a>00126 
<a name="l00134"></a>00134     <span class="keyword">static</span> <span class="keywordtype">size_t</span> extract(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>, <a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a> unicode, <span class="keywordtype">size_t</span> size);
<a name="l00135"></a>00135 
<a name="l00143"></a>00143     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *find(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>, <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> character, <span class="keywordtype">size_t</span> <a class="code" href="a00214.html#a190c5597b1e578ec9c7b85e0b6705e48" title="Convenience function to start a joinable thread.">start</a> = 0);
<a name="l00144"></a>00144 
<a name="l00152"></a>00152     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *rfind(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>, <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> character, <span class="keywordtype">size_t</span> end = (<span class="keywordtype">size_t</span>)-1l);
<a name="l00153"></a>00153 
<a name="l00160"></a>00160     <span class="keyword">static</span> <span class="keywordtype">unsigned</span> ccount(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>, <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> character);
<a name="l00161"></a>00161 
<a name="l00167"></a>00167     <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> getch(FILE *file);
<a name="l00168"></a>00168 
<a name="l00175"></a>00175     <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> putch(<a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> character, FILE *file);
<a name="l00176"></a>00176 };
<a name="l00177"></a>00177 
<a name="l00184"></a><a class="code" href="a00177.html">00184</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a> : <span class="keyword">public</span> <a class="code" href="a00157.html" title="A copy-on-write string class that operates by reference count.">String</a>, <span class="keyword">public</span> <a class="code" href="a00178.html" title="A core class of ut8 encoded string functions.">utf8</a>
<a name="l00185"></a>00185 {
<a name="l00186"></a>00186 <span class="keyword">protected</span>:
<a name="l00190"></a>00190     <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a>();
<a name="l00191"></a>00191 
<a name="l00196"></a>00196     <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a>(<a class="code" href="a00214.html#ab147df0377723db28a0d3ec1f419f2da" title="A convenience class for size of strings.">strsize_t</a> size);
<a name="l00197"></a>00197 
<a name="l00202"></a>00202     <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a>(<span class="keyword">const</span> <a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a> text);
<a name="l00203"></a>00203 
<a name="l00210"></a>00210     <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *text, <a class="code" href="a00214.html#ab147df0377723db28a0d3ec1f419f2da" title="A convenience class for size of strings.">strsize_t</a> size);
<a name="l00211"></a>00211 
<a name="l00218"></a>00218     <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a>(<span class="keyword">const</span> <a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a> *text, <span class="keyword">const</span> <a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a> *end);
<a name="l00219"></a>00219 
<a name="l00225"></a>00225     <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a>(<span class="keyword">const</span> <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a>&amp; existing);
<a name="l00226"></a>00226 
<a name="l00231"></a>00231     <span class="keyword">virtual</span> ~<a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a>();
<a name="l00232"></a>00232 
<a name="l00239"></a>00239     <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a> <span class="keyword">get</span>(<a class="code" href="a00214.html#ab147df0377723db28a0d3ec1f419f2da" title="A convenience class for size of strings.">strsize_t</a> codepoint, <a class="code" href="a00214.html#ab147df0377723db28a0d3ec1f419f2da" title="A convenience class for size of strings.">strsize_t</a> size = 0) <span class="keyword">const</span>;
<a name="l00240"></a>00240 
<a name="l00247"></a><a class="code" href="a00177.html#a5787f3df9aa3f766761b37defc291f89">00247</a>     <span class="keyword">inline</span> <span class="keywordtype">size_t</span> <span class="keyword">get</span>(<a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a> unicode, <span class="keywordtype">size_t</span> size) <span class="keyword">const</span>
<a name="l00248"></a>00248         {<span class="keywordflow">return</span> utf8::extract(str-&gt;text, unicode, size);};
<a name="l00249"></a>00249 
<a name="l00254"></a>00254     <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keyword">const</span> <a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a> unicode);
<a name="l00255"></a>00255 
<a name="l00260"></a>00260     <span class="keywordtype">void</span> <a class="code" href="a00157.html#a2c7d6181fec6ff7b95cb5339613bab7d" title="Append formatted object to our string buffer.">add</a>(<span class="keyword">const</span> <a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a> unicode);
<a name="l00261"></a>00261 
<a name="l00267"></a>00267     <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> <a class="code" href="a00157.html#a188cb7ebdef5d8d099aed66c1b7cb414" title="Return character found at a specific position in the string.">at</a>(<span class="keywordtype">int</span> position) <span class="keyword">const</span>;
<a name="l00268"></a>00268 
<a name="l00275"></a><a class="code" href="a00177.html#a9bac9731e20ef3d6843b2aac6b12bb92">00275</a>     <span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="a00157.html#a1d383d83f27645c4101935d6fd0ee3eb" title="Get a new substring through object expression.">operator()</a>(<a class="code" href="a00214.html#a9152ddb1a47f8f4d5fa929be5a7ff340" title="Resolves issues where wchar_t is not defined.">unicode_t</a> unicode, <span class="keywordtype">size_t</span> size)<span class="keyword"> const</span>
<a name="l00276"></a>00276 <span class="keyword">        </span>{<span class="keywordflow">return</span> utf8::extract(str-&gt;text, unicode, size);};
<a name="l00277"></a>00277 
<a name="l00284"></a>00284     <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a> <a class="code" href="a00157.html#a1d383d83f27645c4101935d6fd0ee3eb" title="Get a new substring through object expression.">operator()</a>(<span class="keywordtype">int</span> codepoint, <a class="code" href="a00214.html#ab147df0377723db28a0d3ec1f419f2da" title="A convenience class for size of strings.">strsize_t</a> size) <span class="keyword">const</span>;
<a name="l00285"></a>00285 
<a name="l00293"></a>00293     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a00157.html#a1d383d83f27645c4101935d6fd0ee3eb" title="Get a new substring through object expression.">operator()</a>(<span class="keywordtype">int</span> offset) <span class="keyword">const</span>;
<a name="l00294"></a>00294 
<a name="l00300"></a><a class="code" href="a00177.html#aee60a67389eddec56bfec6c5a7a56324">00300</a>     <span class="keyword">inline</span> <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> <a class="code" href="a00157.html#ab36586084bf6c05f0dfeee918af1f574" title="Reference a single character in string object by array offset.">operator[]</a>(<span class="keywordtype">int</span> position)<span class="keyword"> const</span>
<a name="l00301"></a>00301 <span class="keyword">        </span>{<span class="keywordflow">return</span> UString::at(position);};
<a name="l00302"></a>00302 
<a name="l00307"></a><a class="code" href="a00177.html#a428a1fe426d672698818eef2f2a3125b">00307</a>     <span class="keyword">inline</span> <a class="code" href="a00214.html#ab147df0377723db28a0d3ec1f419f2da" title="A convenience class for size of strings.">strsize_t</a> <a class="code" href="a00157.html#a8bd3d06e4624be66bf3f51292dec61f4" title="Count all characters in the string (strlen).">count</a>(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00308"></a>00308 <span class="keyword">        </span>{<span class="keywordflow">return</span> utf8::count(str-&gt;text);}
<a name="l00309"></a>00309 
<a name="l00315"></a>00315     <span class="keywordtype">unsigned</span> <a class="code" href="a00157.html#ac9a449b235358bab673447261b7198fe" title="Count number of occurrances of characters in string.">ccount</a>(<a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> character) <span class="keyword">const</span>;
<a name="l00316"></a>00316 
<a name="l00323"></a>00323     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a00157.html#a5333a2ceea55b22ba88b487ead6d333e" title="Find a character in the string.">find</a>(<a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> character, <a class="code" href="a00214.html#ab147df0377723db28a0d3ec1f419f2da" title="A convenience class for size of strings.">strsize_t</a> <a class="code" href="a00214.html#a190c5597b1e578ec9c7b85e0b6705e48" title="Convenience function to start a joinable thread.">start</a> = 0) <span class="keyword">const</span>;
<a name="l00324"></a>00324 
<a name="l00331"></a>00331     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a00157.html#a0586113fd679562260e3553cc0686a37" title="Find last occurance of character in the string.">rfind</a>(<a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> character, <a class="code" href="a00214.html#ab147df0377723db28a0d3ec1f419f2da" title="A convenience class for size of strings.">strsize_t</a> end = npos) <span class="keyword">const</span>;
<a name="l00332"></a>00332 };
<a name="l00333"></a>00333 
<a name="l00339"></a><a class="code" href="a00179.html">00339</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a>
<a name="l00340"></a>00340 {
<a name="l00341"></a>00341 <span class="keyword">protected</span>:
<a name="l00342"></a>00342     uint8_t *text;
<a name="l00343"></a>00343 
<a name="l00344"></a>00344 <span class="keyword">public</span>:
<a name="l00348"></a>00348     <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a>();
<a name="l00349"></a>00349 
<a name="l00354"></a>00354     <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>);
<a name="l00355"></a>00355 
<a name="l00360"></a>00360     <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a>(<span class="keyword">const</span> <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a>&amp; <a class="code" href="a00214.html#a8370bd49e635d1f1c3aec9135f497cec" title="Convenence function to access object copy.">copy</a>);
<a name="l00361"></a>00361 
<a name="l00366"></a>00366     <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a>&amp; operator ++();
<a name="l00367"></a>00367 
<a name="l00372"></a>00372     <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a>&amp; operator --();
<a name="l00373"></a>00373 
<a name="l00379"></a>00379     <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a>&amp; operator +=(<span class="keywordtype">long</span> offset);
<a name="l00380"></a>00380 
<a name="l00386"></a>00386     <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a>&amp; operator -=(<span class="keywordtype">long</span> offset);
<a name="l00387"></a>00387 
<a name="l00393"></a>00393     <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a> operator+(<span class="keywordtype">long</span> offset) <span class="keyword">const</span>;
<a name="l00394"></a>00394 
<a name="l00400"></a>00400     <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a> operator-(<span class="keywordtype">long</span> offset) <span class="keyword">const</span>;
<a name="l00401"></a>00401 
<a name="l00406"></a><a class="code" href="a00179.html#af7648b82cb8cc6641402fdc3f4a90aa0">00406</a>     <span class="keyword">inline</span> operator bool()<span class="keyword"> const</span>
<a name="l00407"></a>00407 <span class="keyword">        </span>{<span class="keywordflow">return</span> text != NULL;};
<a name="l00408"></a>00408 
<a name="l00413"></a><a class="code" href="a00179.html#ade783ed5ffc19cfd36c496307ea0f373">00413</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!()<span class="keyword"> const</span>
<a name="l00414"></a>00414 <span class="keyword">        </span>{<span class="keywordflow">return</span> text == NULL;};
<a name="l00415"></a>00415 
<a name="l00421"></a>00421     <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> operator[](<span class="keywordtype">long</span> codepoint) <span class="keyword">const</span>;
<a name="l00422"></a>00422     
<a name="l00428"></a>00428     <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a>&amp; operator=(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>);
<a name="l00429"></a>00429 
<a name="l00433"></a>00433     <span class="keywordtype">void</span> inc(<span class="keywordtype">void</span>);
<a name="l00434"></a>00434 
<a name="l00438"></a>00438     <span class="keywordtype">void</span> dec(<span class="keywordtype">void</span>);
<a name="l00439"></a>00439 
<a name="l00445"></a><a class="code" href="a00179.html#a69a43571a4e07c487e5ab139c49764f3">00445</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>)<span class="keyword"> const</span>
<a name="l00446"></a>00446 <span class="keyword">        </span>{<span class="keywordflow">return</span> (<span class="keyword">const</span> <span class="keywordtype">char</span> *)text == string;};
<a name="l00447"></a>00447 
<a name="l00453"></a><a class="code" href="a00179.html#a465335481a635d27cb7b411c0fc4a16a">00453</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>)<span class="keyword"> const</span>
<a name="l00454"></a>00454 <span class="keyword">        </span>{<span class="keywordflow">return</span> (<span class="keyword">const</span> <span class="keywordtype">char</span> *)text != string;};
<a name="l00455"></a>00455 
<a name="l00460"></a><a class="code" href="a00179.html#a36223bf85128ffc1c9463697f358db48">00460</a>     <span class="keyword">inline</span>  <a class="code" href="a00214.html#a3f92a2d8f1343874335bd5c2b1dfe62b" title="32 bit unicode character code.">ucs4_t</a> operator*()<span class="keyword"> const</span>
<a name="l00461"></a>00461 <span class="keyword">        </span>{<span class="keywordflow">return</span> utf8::codepoint((<span class="keyword">const</span> <span class="keywordtype">char</span> *)text);};
<a name="l00462"></a>00462 
<a name="l00467"></a><a class="code" href="a00179.html#ae45052a5f5274feb0352101e7f7ee5ed">00467</a>     <span class="keyword">inline</span> <span class="keywordtype">char</span> *c_str(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00468"></a>00468 <span class="keyword">        </span>{<span class="keywordflow">return</span> (<span class="keywordtype">char</span> *)text;};
<a name="l00469"></a>00469 
<a name="l00474"></a><a class="code" href="a00179.html#ace4552351e30acb3ef7c9411453bc27e">00474</a>     <span class="keyword">inline</span> operator char*()<span class="keyword"> const</span>
<a name="l00475"></a>00475 <span class="keyword">        </span>{<span class="keywordflow">return</span> (<span class="keywordtype">char</span> *)text;};
<a name="l00476"></a>00476 
<a name="l00481"></a><a class="code" href="a00179.html#ad1adc243c51b3411e21c052bb8245bdc">00481</a>     <span class="keyword">inline</span> <span class="keywordtype">size_t</span> len(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00482"></a>00482 <span class="keyword">        </span>{<span class="keywordflow">return</span> utf8::count((<span class="keyword">const</span> <span class="keywordtype">char</span> *)text);};
<a name="l00483"></a>00483 };
<a name="l00484"></a>00484 
<a name="l00488"></a><a class="code" href="a00214.html#a967a52e5963eb81ee869f8ea2451e916">00488</a> <span class="keyword">typedef</span> <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">UString</a> <a class="code" href="a00177.html" title="A copy-on-write utf8 string class that operates by reference count.">ustring_t</a>;
<a name="l00489"></a>00489 
<a name="l00493"></a><a class="code" href="a00214.html#a48e6e169a328be3745c0827be5b4038c">00493</a> <span class="keyword">typedef</span> <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_pointer</a> <a class="code" href="a00179.html" title="Pointer to utf8 encoded character data.">utf8_t</a>;
<a name="l00494"></a>00494 
<a name="l00495"></a>00495 END_NAMESPACE
<a name="l00496"></a>00496 
<a name="l00497"></a>00497 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:01 2010 for UCommon by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>