Bump to version 0.9.4
[platform/upstream/libunistring.git] / doc / libunistring_8.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
2 <html>
3 <!-- Created on September, 1 2014 by texi2html 1.78a -->
4 <!--
5 Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
6             Karl Berry  <karl@freefriends.org>
7             Olaf Bachmann <obachman@mathematik.uni-kl.de>
8             and many others.
9 Maintained by: Many creative people.
10 Send bugs and suggestions to <texi2html-bug@nongnu.org>
11
12 -->
13 <head>
14 <title>GNU libunistring: 8. Unicode character classification and properties &lt;unictype.h&gt;</title>
15
16 <meta name="description" content="GNU libunistring: 8. Unicode character classification and properties &lt;unictype.h&gt;">
17 <meta name="keywords" content="GNU libunistring: 8. Unicode character classification and properties &lt;unictype.h&gt;">
18 <meta name="resource-type" content="document">
19 <meta name="distribution" content="global">
20 <meta name="Generator" content="texi2html 1.78a">
21 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
22 <style type="text/css">
23 <!--
24 a.summary-letter {text-decoration: none}
25 pre.display {font-family: serif}
26 pre.format {font-family: serif}
27 pre.menu-comment {font-family: serif}
28 pre.menu-preformatted {font-family: serif}
29 pre.smalldisplay {font-family: serif; font-size: smaller}
30 pre.smallexample {font-size: smaller}
31 pre.smallformat {font-family: serif; font-size: smaller}
32 pre.smalllisp {font-size: smaller}
33 span.roman {font-family:serif; font-weight:normal;}
34 span.sansserif {font-family:sans-serif; font-weight:normal;}
35 ul.toc {list-style: none}
36 -->
37 </style>
38
39
40 </head>
41
42 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
43
44 <table cellpadding="1" cellspacing="1" border="0">
45 <tr><td valign="middle" align="left">[<a href="libunistring_7.html#SEC19" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
46 <td valign="middle" align="left">[<a href="libunistring_9.html#SEC40" title="Next chapter"> &gt;&gt; </a>]</td>
47 <td valign="middle" align="left"> &nbsp; </td>
48 <td valign="middle" align="left"> &nbsp; </td>
49 <td valign="middle" align="left"> &nbsp; </td>
50 <td valign="middle" align="left"> &nbsp; </td>
51 <td valign="middle" align="left"> &nbsp; </td>
52 <td valign="middle" align="left">[<a href="libunistring.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
53 <td valign="middle" align="left">[<a href="libunistring.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
54 <td valign="middle" align="left">[<a href="libunistring_19.html#SEC77" title="Index">Index</a>]</td>
55 <td valign="middle" align="left">[<a href="libunistring_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
56 </tr></table>
57
58 <hr size="2">
59 <a name="unictype_002eh"></a>
60 <a name="SEC20"></a>
61 <h1 class="chapter"> <a href="libunistring.html#TOC20">8. Unicode character classification and properties <code>&lt;unictype.h&gt;</code></a> </h1>
62
63 <p>This include file declares functions that classify Unicode characters
64 and that test whether Unicode characters have specific properties.
65 </p>
66 <p>The classification assigns a &ldquo;general category&rdquo; to every Unicode
67 character.  This is similar to the classification provided by ISO C in
68 <code>&lt;wctype.h&gt;</code>.
69 </p>
70 <p>Properties are the data that guides various text processing algorithms
71 in the presence of specific Unicode characters.
72 </p>
73
74 <hr size="6">
75 <a name="General-category"></a>
76 <a name="SEC21"></a>
77 <h2 class="section"> <a href="libunistring.html#TOC21">8.1 General category</a> </h2>
78
79 <p>Every Unicode character or code point has a <em>general category</em> assigned
80 to it.  This classification is important for most algorithms that work on
81 Unicode text.
82 </p>
83 <p>The GNU libunistring library provides two kinds of API for working with
84 general categories.  The object oriented API uses a variable to denote
85 every predefined general category value or combinations thereof.  The
86 low-level API uses a bit mask instead.  The advantage of the object oriented
87 API is that if only a few predefined general category values are used,
88 the data tables are relatively small.  When you combine general category
89 values (using <code>uc_general_category_or</code>, <code>uc_general_category_and</code>,
90 or <code>uc_general_category_and_not</code>), or when you use the low level
91 bit masks, a big table is used thats holds the complete general category
92 information for all Unicode characters.
93 </p>
94
95 <hr size="6">
96 <a name="Object-oriented-API"></a>
97 <a name="SEC22"></a>
98 <h3 class="subsection"> <a href="libunistring.html#TOC22">8.1.1 The object oriented API for general category</a> </h3>
99
100 <dl>
101 <dt><u>Type:</u> <b>uc_general_category_t</b>
102 <a name="IDX241"></a>
103 </dt>
104 <dd><p>This data type denotes a general category value.  It is an immediate type that
105 can be copied by simple assignment, without involving memory allocation.  It is
106 not an array type.
107 </p></dd></dl>
108
109 <p>The following are the predefined general category value.  Additional general
110 categories may be added in the future.
111 </p>
112 <dl>
113 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_L</b>
114 <a name="IDX242"></a>
115 </dt>
116 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_LC</b>
117 <a name="IDX243"></a>
118 </dt>
119 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Lu</b>
120 <a name="IDX244"></a>
121 </dt>
122 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Ll</b>
123 <a name="IDX245"></a>
124 </dt>
125 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Lt</b>
126 <a name="IDX246"></a>
127 </dt>
128 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Lm</b>
129 <a name="IDX247"></a>
130 </dt>
131 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Lo</b>
132 <a name="IDX248"></a>
133 </dt>
134 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_M</b>
135 <a name="IDX249"></a>
136 </dt>
137 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Mn</b>
138 <a name="IDX250"></a>
139 </dt>
140 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Mc</b>
141 <a name="IDX251"></a>
142 </dt>
143 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Me</b>
144 <a name="IDX252"></a>
145 </dt>
146 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_N</b>
147 <a name="IDX253"></a>
148 </dt>
149 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Nd</b>
150 <a name="IDX254"></a>
151 </dt>
152 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Nl</b>
153 <a name="IDX255"></a>
154 </dt>
155 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_No</b>
156 <a name="IDX256"></a>
157 </dt>
158 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_P</b>
159 <a name="IDX257"></a>
160 </dt>
161 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Pc</b>
162 <a name="IDX258"></a>
163 </dt>
164 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Pd</b>
165 <a name="IDX259"></a>
166 </dt>
167 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Ps</b>
168 <a name="IDX260"></a>
169 </dt>
170 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Pe</b>
171 <a name="IDX261"></a>
172 </dt>
173 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Pi</b>
174 <a name="IDX262"></a>
175 </dt>
176 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Pf</b>
177 <a name="IDX263"></a>
178 </dt>
179 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Po</b>
180 <a name="IDX264"></a>
181 </dt>
182 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_S</b>
183 <a name="IDX265"></a>
184 </dt>
185 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Sm</b>
186 <a name="IDX266"></a>
187 </dt>
188 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Sc</b>
189 <a name="IDX267"></a>
190 </dt>
191 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Sk</b>
192 <a name="IDX268"></a>
193 </dt>
194 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_So</b>
195 <a name="IDX269"></a>
196 </dt>
197 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Z</b>
198 <a name="IDX270"></a>
199 </dt>
200 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Zs</b>
201 <a name="IDX271"></a>
202 </dt>
203 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Zl</b>
204 <a name="IDX272"></a>
205 </dt>
206 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Zp</b>
207 <a name="IDX273"></a>
208 </dt>
209 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_C</b>
210 <a name="IDX274"></a>
211 </dt>
212 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Cc</b>
213 <a name="IDX275"></a>
214 </dt>
215 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Cf</b>
216 <a name="IDX276"></a>
217 </dt>
218 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Cs</b>
219 <a name="IDX277"></a>
220 </dt>
221 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Co</b>
222 <a name="IDX278"></a>
223 </dt>
224 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Cn</b>
225 <a name="IDX279"></a>
226 </dt>
227 </dl>
228
229 <p>The following are alias names for predefined General category values.
230 </p>
231 <dl>
232 <dt><u>Macro:</u> uc_general_category_t <b>UC_LETTER</b>
233 <a name="IDX280"></a>
234 </dt>
235 <dd><p>This is another name for <code>UC_CATEGORY_L</code>.
236 </p></dd></dl>
237
238 <dl>
239 <dt><u>Macro:</u> uc_general_category_t <b>UC_CASED_LETTER</b>
240 <a name="IDX281"></a>
241 </dt>
242 <dd><p>This is another name for <code>UC_CATEGORY_LC</code>.
243 </p></dd></dl>
244
245 <dl>
246 <dt><u>Macro:</u> uc_general_category_t <b>UC_UPPERCASE_LETTER</b>
247 <a name="IDX282"></a>
248 </dt>
249 <dd><p>This is another name for <code>UC_CATEGORY_Lu</code>.
250 </p></dd></dl>
251
252 <dl>
253 <dt><u>Macro:</u> uc_general_category_t <b>UC_LOWERCASE_LETTER</b>
254 <a name="IDX283"></a>
255 </dt>
256 <dd><p>This is another name for <code>UC_CATEGORY_Ll</code>.
257 </p></dd></dl>
258
259 <dl>
260 <dt><u>Macro:</u> uc_general_category_t <b>UC_TITLECASE_LETTER</b>
261 <a name="IDX284"></a>
262 </dt>
263 <dd><p>This is another name for <code>UC_CATEGORY_Lt</code>.
264 </p></dd></dl>
265
266 <dl>
267 <dt><u>Macro:</u> uc_general_category_t <b>UC_MODIFIER_LETTER</b>
268 <a name="IDX285"></a>
269 </dt>
270 <dd><p>This is another name for <code>UC_CATEGORY_Lm</code>.
271 </p></dd></dl>
272
273 <dl>
274 <dt><u>Macro:</u> uc_general_category_t <b>UC_OTHER_LETTER</b>
275 <a name="IDX286"></a>
276 </dt>
277 <dd><p>This is another name for <code>UC_CATEGORY_Lo</code>.
278 </p></dd></dl>
279
280 <dl>
281 <dt><u>Macro:</u> uc_general_category_t <b>UC_MARK</b>
282 <a name="IDX287"></a>
283 </dt>
284 <dd><p>This is another name for <code>UC_CATEGORY_M</code>.
285 </p></dd></dl>
286
287 <dl>
288 <dt><u>Macro:</u> uc_general_category_t <b>UC_NON_SPACING_MARK</b>
289 <a name="IDX288"></a>
290 </dt>
291 <dd><p>This is another name for <code>UC_CATEGORY_Mn</code>.
292 </p></dd></dl>
293
294 <dl>
295 <dt><u>Macro:</u> uc_general_category_t <b>UC_COMBINING_SPACING_MARK</b>
296 <a name="IDX289"></a>
297 </dt>
298 <dd><p>This is another name for <code>UC_CATEGORY_Mc</code>.
299 </p></dd></dl>
300
301 <dl>
302 <dt><u>Macro:</u> uc_general_category_t <b>UC_ENCLOSING_MARK</b>
303 <a name="IDX290"></a>
304 </dt>
305 <dd><p>This is another name for <code>UC_CATEGORY_Me</code>.
306 </p></dd></dl>
307
308 <dl>
309 <dt><u>Macro:</u> uc_general_category_t <b>UC_NUMBER</b>
310 <a name="IDX291"></a>
311 </dt>
312 <dd><p>This is another name for <code>UC_CATEGORY_N</code>.
313 </p></dd></dl>
314
315 <dl>
316 <dt><u>Macro:</u> uc_general_category_t <b>UC_DECIMAL_DIGIT_NUMBER</b>
317 <a name="IDX292"></a>
318 </dt>
319 <dd><p>This is another name for <code>UC_CATEGORY_Nd</code>.
320 </p></dd></dl>
321
322 <dl>
323 <dt><u>Macro:</u> uc_general_category_t <b>UC_LETTER_NUMBER</b>
324 <a name="IDX293"></a>
325 </dt>
326 <dd><p>This is another name for <code>UC_CATEGORY_Nl</code>.
327 </p></dd></dl>
328
329 <dl>
330 <dt><u>Macro:</u> uc_general_category_t <b>UC_OTHER_NUMBER</b>
331 <a name="IDX294"></a>
332 </dt>
333 <dd><p>This is another name for <code>UC_CATEGORY_No</code>.
334 </p></dd></dl>
335
336 <dl>
337 <dt><u>Macro:</u> uc_general_category_t <b>UC_PUNCTUATION</b>
338 <a name="IDX295"></a>
339 </dt>
340 <dd><p>This is another name for <code>UC_CATEGORY_P</code>.
341 </p></dd></dl>
342
343 <dl>
344 <dt><u>Macro:</u> uc_general_category_t <b>UC_CONNECTOR_PUNCTUATION</b>
345 <a name="IDX296"></a>
346 </dt>
347 <dd><p>This is another name for <code>UC_CATEGORY_Pc</code>.
348 </p></dd></dl>
349
350 <dl>
351 <dt><u>Macro:</u> uc_general_category_t <b>UC_DASH_PUNCTUATION</b>
352 <a name="IDX297"></a>
353 </dt>
354 <dd><p>This is another name for <code>UC_CATEGORY_Pd</code>.
355 </p></dd></dl>
356
357 <dl>
358 <dt><u>Macro:</u> uc_general_category_t <b>UC_OPEN_PUNCTUATION</b>
359 <a name="IDX298"></a>
360 </dt>
361 <dd><p>This is another name for <code>UC_CATEGORY_Ps</code> (&ldquo;start punctuation&rdquo;).
362 </p></dd></dl>
363
364 <dl>
365 <dt><u>Macro:</u> uc_general_category_t <b>UC_CLOSE_PUNCTUATION</b>
366 <a name="IDX299"></a>
367 </dt>
368 <dd><p>This is another name for <code>UC_CATEGORY_Pe</code> (&ldquo;end punctuation&rdquo;).
369 </p></dd></dl>
370
371 <dl>
372 <dt><u>Macro:</u> uc_general_category_t <b>UC_INITIAL_QUOTE_PUNCTUATION</b>
373 <a name="IDX300"></a>
374 </dt>
375 <dd><p>This is another name for <code>UC_CATEGORY_Pi</code>.
376 </p></dd></dl>
377
378 <dl>
379 <dt><u>Macro:</u> uc_general_category_t <b>UC_FINAL_QUOTE_PUNCTUATION</b>
380 <a name="IDX301"></a>
381 </dt>
382 <dd><p>This is another name for <code>UC_CATEGORY_Pf</code>.
383 </p></dd></dl>
384
385 <dl>
386 <dt><u>Macro:</u> uc_general_category_t <b>UC_OTHER_PUNCTUATION</b>
387 <a name="IDX302"></a>
388 </dt>
389 <dd><p>This is another name for <code>UC_CATEGORY_Po</code>.
390 </p></dd></dl>
391
392 <dl>
393 <dt><u>Macro:</u> uc_general_category_t <b>UC_SYMBOL</b>
394 <a name="IDX303"></a>
395 </dt>
396 <dd><p>This is another name for <code>UC_CATEGORY_S</code>.
397 </p></dd></dl>
398
399 <dl>
400 <dt><u>Macro:</u> uc_general_category_t <b>UC_MATH_SYMBOL</b>
401 <a name="IDX304"></a>
402 </dt>
403 <dd><p>This is another name for <code>UC_CATEGORY_Sm</code>.
404 </p></dd></dl>
405
406 <dl>
407 <dt><u>Macro:</u> uc_general_category_t <b>UC_CURRENCY_SYMBOL</b>
408 <a name="IDX305"></a>
409 </dt>
410 <dd><p>This is another name for <code>UC_CATEGORY_Sc</code>.
411 </p></dd></dl>
412
413 <dl>
414 <dt><u>Macro:</u> uc_general_category_t <b>UC_MODIFIER_SYMBOL</b>
415 <a name="IDX306"></a>
416 </dt>
417 <dd><p>This is another name for <code>UC_CATEGORY_Sk</code>.
418 </p></dd></dl>
419
420 <dl>
421 <dt><u>Macro:</u> uc_general_category_t <b>UC_OTHER_SYMBOL</b>
422 <a name="IDX307"></a>
423 </dt>
424 <dd><p>This is another name for <code>UC_CATEGORY_So</code>.
425 </p></dd></dl>
426
427 <dl>
428 <dt><u>Macro:</u> uc_general_category_t <b>UC_SEPARATOR</b>
429 <a name="IDX308"></a>
430 </dt>
431 <dd><p>This is another name for <code>UC_CATEGORY_Z</code>.
432 </p></dd></dl>
433
434 <dl>
435 <dt><u>Macro:</u> uc_general_category_t <b>UC_SPACE_SEPARATOR</b>
436 <a name="IDX309"></a>
437 </dt>
438 <dd><p>This is another name for <code>UC_CATEGORY_Zs</code>.
439 </p></dd></dl>
440
441 <dl>
442 <dt><u>Macro:</u> uc_general_category_t <b>UC_LINE_SEPARATOR</b>
443 <a name="IDX310"></a>
444 </dt>
445 <dd><p>This is another name for <code>UC_CATEGORY_Zl</code>.
446 </p></dd></dl>
447
448 <dl>
449 <dt><u>Macro:</u> uc_general_category_t <b>UC_PARAGRAPH_SEPARATOR</b>
450 <a name="IDX311"></a>
451 </dt>
452 <dd><p>This is another name for <code>UC_CATEGORY_Zp</code>.
453 </p></dd></dl>
454
455 <dl>
456 <dt><u>Macro:</u> uc_general_category_t <b>UC_OTHER</b>
457 <a name="IDX312"></a>
458 </dt>
459 <dd><p>This is another name for <code>UC_CATEGORY_C</code>.
460 </p></dd></dl>
461
462 <dl>
463 <dt><u>Macro:</u> uc_general_category_t <b>UC_CONTROL</b>
464 <a name="IDX313"></a>
465 </dt>
466 <dd><p>This is another name for <code>UC_CATEGORY_Cc</code>.
467 </p></dd></dl>
468
469 <dl>
470 <dt><u>Macro:</u> uc_general_category_t <b>UC_FORMAT</b>
471 <a name="IDX314"></a>
472 </dt>
473 <dd><p>This is another name for <code>UC_CATEGORY_Cf</code>.
474 </p></dd></dl>
475
476 <dl>
477 <dt><u>Macro:</u> uc_general_category_t <b>UC_SURROGATE</b>
478 <a name="IDX315"></a>
479 </dt>
480 <dd><p>This is another name for <code>UC_CATEGORY_Cs</code>.  All code points in this
481 category are invalid characters.
482 </p></dd></dl>
483
484 <dl>
485 <dt><u>Macro:</u> uc_general_category_t <b>UC_PRIVATE_USE</b>
486 <a name="IDX316"></a>
487 </dt>
488 <dd><p>This is another name for <code>UC_CATEGORY_Co</code>.
489 </p></dd></dl>
490
491 <dl>
492 <dt><u>Macro:</u> uc_general_category_t <b>UC_UNASSIGNED</b>
493 <a name="IDX317"></a>
494 </dt>
495 <dd><p>This is another name for <code>UC_CATEGORY_Cn</code>.  Some code points in this
496 category are invalid characters.
497 </p></dd></dl>
498
499 <p>The following functions combine general categories, like in a boolean algebra,
500 except that there is no &lsquo;<samp>not</samp>&rsquo; operation.
501 </p>
502 <dl>
503 <dt><u>Function:</u> uc_general_category_t <b>uc_general_category_or</b><i> (uc_general_category_t <var>category1</var>, uc_general_category_t <var>category2</var>)</i>
504 <a name="IDX318"></a>
505 </dt>
506 <dd><p>Returns the union of two general categories.
507 This corresponds to the unions of the two sets of characters.
508 </p></dd></dl>
509
510 <dl>
511 <dt><u>Function:</u> uc_general_category_t <b>uc_general_category_and</b><i> (uc_general_category_t <var>category1</var>, uc_general_category_t <var>category2</var>)</i>
512 <a name="IDX319"></a>
513 </dt>
514 <dd><p>Returns the intersection of two general categories as bit masks.
515 This <em>does not</em> correspond to the intersection of the two sets of
516 characters.
517 </p></dd></dl>
518
519 <dl>
520 <dt><u>Function:</u> uc_general_category_t <b>uc_general_category_and_not</b><i> (uc_general_category_t <var>category1</var>, uc_general_category_t <var>category2</var>)</i>
521 <a name="IDX320"></a>
522 </dt>
523 <dd><p>Returns the intersection of a general category with the complement of a
524 second general category, as bit masks.
525 This <em>does not</em> correspond to the intersection with complement, when
526 viewing the categories as sets of characters.
527 </p></dd></dl>
528
529 <p>The following functions associate general categories with their name.
530 </p>
531 <dl>
532 <dt><u>Function:</u> const char * <b>uc_general_category_name</b><i> (uc_general_category_t <var>category</var>)</i>
533 <a name="IDX321"></a>
534 </dt>
535 <dd><p>Returns the name of a general category, more precisely, the abbreviated name.
536 Returns NULL if the general category corresponds to a bit mask that does not
537 have a name.
538 </p></dd></dl>
539
540 <dl>
541 <dt><u>Function:</u> const char * <b>uc_general_category_long_name</b><i> (uc_general_category_t <var>category</var>)</i>
542 <a name="IDX322"></a>
543 </dt>
544 <dd><p>Returns the long name of a general category.
545 Returns NULL if the general category corresponds to a bit mask that does not
546 have a name.
547 </p></dd></dl>
548
549 <dl>
550 <dt><u>Function:</u> uc_general_category_t <b>uc_general_category_byname</b><i> (const char *<var>category_name</var>)</i>
551 <a name="IDX323"></a>
552 </dt>
553 <dd><p>Returns the general category given by name, e.g. <code>&quot;Lu&quot;</code>, or by long
554 name, e.g. <code>&quot;Uppercase Letter&quot;</code>.
555 This lookup ignores spaces, underscores, or hyphens as word separators and is
556 case-insignificant.
557 </p></dd></dl>
558
559 <p>The following functions view general categories as sets of Unicode characters.
560 </p>
561 <dl>
562 <dt><u>Function:</u> uc_general_category_t <b>uc_general_category</b><i> (ucs4_t <var>uc</var>)</i>
563 <a name="IDX324"></a>
564 </dt>
565 <dd><p>Returns the general category of a Unicode character.
566 </p>
567 <p>This function uses a big table.
568 </p></dd></dl>
569
570 <dl>
571 <dt><u>Function:</u> bool <b>uc_is_general_category</b><i> (ucs4_t <var>uc</var>, uc_general_category_t <var>category</var>)</i>
572 <a name="IDX325"></a>
573 </dt>
574 <dd><p>Tests whether a Unicode character belongs to a given category.
575 The <var>category</var> argument can be a predefined general category or the
576 combination of several predefined general categories.
577 </p></dd></dl>
578
579 <hr size="6">
580 <a name="Bit-mask-API"></a>
581 <a name="SEC23"></a>
582 <h3 class="subsection"> <a href="libunistring.html#TOC23">8.1.2 The bit mask API for general category</a> </h3>
583
584 <p>The following are the predefined general category value as bit masks.
585 Additional general categories may be added in the future.
586 </p>
587 <dl>
588 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_L</b>
589 <a name="IDX326"></a>
590 </dt>
591 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_LC</b>
592 <a name="IDX327"></a>
593 </dt>
594 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Lu</b>
595 <a name="IDX328"></a>
596 </dt>
597 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Ll</b>
598 <a name="IDX329"></a>
599 </dt>
600 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Lt</b>
601 <a name="IDX330"></a>
602 </dt>
603 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Lm</b>
604 <a name="IDX331"></a>
605 </dt>
606 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Lo</b>
607 <a name="IDX332"></a>
608 </dt>
609 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_M</b>
610 <a name="IDX333"></a>
611 </dt>
612 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Mn</b>
613 <a name="IDX334"></a>
614 </dt>
615 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Mc</b>
616 <a name="IDX335"></a>
617 </dt>
618 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Me</b>
619 <a name="IDX336"></a>
620 </dt>
621 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_N</b>
622 <a name="IDX337"></a>
623 </dt>
624 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Nd</b>
625 <a name="IDX338"></a>
626 </dt>
627 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Nl</b>
628 <a name="IDX339"></a>
629 </dt>
630 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_No</b>
631 <a name="IDX340"></a>
632 </dt>
633 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_P</b>
634 <a name="IDX341"></a>
635 </dt>
636 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Pc</b>
637 <a name="IDX342"></a>
638 </dt>
639 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Pd</b>
640 <a name="IDX343"></a>
641 </dt>
642 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Ps</b>
643 <a name="IDX344"></a>
644 </dt>
645 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Pe</b>
646 <a name="IDX345"></a>
647 </dt>
648 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Pi</b>
649 <a name="IDX346"></a>
650 </dt>
651 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Pf</b>
652 <a name="IDX347"></a>
653 </dt>
654 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Po</b>
655 <a name="IDX348"></a>
656 </dt>
657 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_S</b>
658 <a name="IDX349"></a>
659 </dt>
660 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Sm</b>
661 <a name="IDX350"></a>
662 </dt>
663 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Sc</b>
664 <a name="IDX351"></a>
665 </dt>
666 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Sk</b>
667 <a name="IDX352"></a>
668 </dt>
669 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_So</b>
670 <a name="IDX353"></a>
671 </dt>
672 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Z</b>
673 <a name="IDX354"></a>
674 </dt>
675 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Zs</b>
676 <a name="IDX355"></a>
677 </dt>
678 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Zl</b>
679 <a name="IDX356"></a>
680 </dt>
681 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Zp</b>
682 <a name="IDX357"></a>
683 </dt>
684 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_C</b>
685 <a name="IDX358"></a>
686 </dt>
687 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Cc</b>
688 <a name="IDX359"></a>
689 </dt>
690 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Cf</b>
691 <a name="IDX360"></a>
692 </dt>
693 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Cs</b>
694 <a name="IDX361"></a>
695 </dt>
696 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Co</b>
697 <a name="IDX362"></a>
698 </dt>
699 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Cn</b>
700 <a name="IDX363"></a>
701 </dt>
702 </dl>
703
704 <p>The following function views general categories as sets of Unicode characters.
705 </p>
706 <dl>
707 <dt><u>Function:</u> bool <b>uc_is_general_category_withtable</b><i> (ucs4_t <var>uc</var>, uint32_t <var>bitmask</var>)</i>
708 <a name="IDX364"></a>
709 </dt>
710 <dd><p>Tests whether a Unicode character belongs to a given category.
711 The <var>bitmask</var> argument can be a predefined general category bitmask or the
712 combination of several predefined general category bitmasks.
713 </p>
714 <p>This function uses a big table comprising all general categories.
715 </p></dd></dl>
716
717 <hr size="6">
718 <a name="Canonical-combining-class"></a>
719 <a name="SEC24"></a>
720 <h2 class="section"> <a href="libunistring.html#TOC24">8.2 Canonical combining class</a> </h2>
721
722 <p>Every Unicode character or code point has a <em>canonical combining class</em>
723 assigned to it.
724 </p>
725 <p>What is the meaning of the canonical combining class?  Essentially, it
726 indicates the priority with which a combining character is attached to its
727 base character.  The characters for which the canonical combining class is 0
728 are the base characters, and the characters for which it is greater than 0 are
729 the combining characters.  Combining characters are rendered
730 near/attached/around their base character, and combining characters with small
731 combining classes are attached &quot;first&quot; or &quot;closer&quot; to the base character.
732 </p>
733 <p>The canonical combining class of a character is a number in the range
734 0..255.  The possible values are described in the Unicode Character Database
735 <a href="http://www.unicode.org/Public/UNIDATA/UCD.html">http://www.unicode.org/Public/UNIDATA/UCD.html</a>.  The list here is
736 not definitive; more values can be added in future versions.
737 </p>
738 <dl>
739 <dt><u>Constant:</u> int <b>UC_CCC_NR</b>
740 <a name="IDX365"></a>
741 </dt>
742 <dd><p>The canonical combining class value for &ldquo;Not Reordered&rdquo; characters.
743 The value is 0.
744 </p></dd></dl>
745
746 <dl>
747 <dt><u>Constant:</u> int <b>UC_CCC_OV</b>
748 <a name="IDX366"></a>
749 </dt>
750 <dd><p>The canonical combining class value for &ldquo;Overlay&rdquo; characters.
751 </p></dd></dl>
752
753 <dl>
754 <dt><u>Constant:</u> int <b>UC_CCC_NK</b>
755 <a name="IDX367"></a>
756 </dt>
757 <dd><p>The canonical combining class value for &ldquo;Nukta&rdquo; characters.
758 </p></dd></dl>
759
760 <dl>
761 <dt><u>Constant:</u> int <b>UC_CCC_KV</b>
762 <a name="IDX368"></a>
763 </dt>
764 <dd><p>The canonical combining class value for &ldquo;Kana Voicing&rdquo; characters.
765 </p></dd></dl>
766
767 <dl>
768 <dt><u>Constant:</u> int <b>UC_CCC_VR</b>
769 <a name="IDX369"></a>
770 </dt>
771 <dd><p>The canonical combining class value for &ldquo;Virama&rdquo; characters.
772 </p></dd></dl>
773
774 <dl>
775 <dt><u>Constant:</u> int <b>UC_CCC_ATBL</b>
776 <a name="IDX370"></a>
777 </dt>
778 <dd><p>The canonical combining class value for &ldquo;Attached Below Left&rdquo; characters.
779 </p></dd></dl>
780
781 <dl>
782 <dt><u>Constant:</u> int <b>UC_CCC_ATB</b>
783 <a name="IDX371"></a>
784 </dt>
785 <dd><p>The canonical combining class value for &ldquo;Attached Below&rdquo; characters.
786 </p></dd></dl>
787
788 <dl>
789 <dt><u>Constant:</u> int <b>UC_CCC_ATA</b>
790 <a name="IDX372"></a>
791 </dt>
792 <dd><p>The canonical combining class value for &ldquo;Attached Above&rdquo; characters.
793 </p></dd></dl>
794
795 <dl>
796 <dt><u>Constant:</u> int <b>UC_CCC_ATAR</b>
797 <a name="IDX373"></a>
798 </dt>
799 <dd><p>The canonical combining class value for &ldquo;Attached Above Right&rdquo; characters.
800 </p></dd></dl>
801
802 <dl>
803 <dt><u>Constant:</u> int <b>UC_CCC_BL</b>
804 <a name="IDX374"></a>
805 </dt>
806 <dd><p>The canonical combining class value for &ldquo;Below Left&rdquo; characters.
807 </p></dd></dl>
808
809 <dl>
810 <dt><u>Constant:</u> int <b>UC_CCC_B</b>
811 <a name="IDX375"></a>
812 </dt>
813 <dd><p>The canonical combining class value for &ldquo;Below&rdquo; characters.
814 </p></dd></dl>
815
816 <dl>
817 <dt><u>Constant:</u> int <b>UC_CCC_BR</b>
818 <a name="IDX376"></a>
819 </dt>
820 <dd><p>The canonical combining class value for &ldquo;Below Right&rdquo; characters.
821 </p></dd></dl>
822
823 <dl>
824 <dt><u>Constant:</u> int <b>UC_CCC_L</b>
825 <a name="IDX377"></a>
826 </dt>
827 <dd><p>The canonical combining class value for &ldquo;Left&rdquo; characters.
828 </p></dd></dl>
829
830 <dl>
831 <dt><u>Constant:</u> int <b>UC_CCC_R</b>
832 <a name="IDX378"></a>
833 </dt>
834 <dd><p>The canonical combining class value for &ldquo;Right&rdquo; characters.
835 </p></dd></dl>
836
837 <dl>
838 <dt><u>Constant:</u> int <b>UC_CCC_AL</b>
839 <a name="IDX379"></a>
840 </dt>
841 <dd><p>The canonical combining class value for &ldquo;Above Left&rdquo; characters.
842 </p></dd></dl>
843
844 <dl>
845 <dt><u>Constant:</u> int <b>UC_CCC_A</b>
846 <a name="IDX380"></a>
847 </dt>
848 <dd><p>The canonical combining class value for &ldquo;Above&rdquo; characters.
849 </p></dd></dl>
850
851 <dl>
852 <dt><u>Constant:</u> int <b>UC_CCC_AR</b>
853 <a name="IDX381"></a>
854 </dt>
855 <dd><p>The canonical combining class value for &ldquo;Above Right&rdquo; characters.
856 </p></dd></dl>
857
858 <dl>
859 <dt><u>Constant:</u> int <b>UC_CCC_DB</b>
860 <a name="IDX382"></a>
861 </dt>
862 <dd><p>The canonical combining class value for &ldquo;Double Below&rdquo; characters.
863 </p></dd></dl>
864
865 <dl>
866 <dt><u>Constant:</u> int <b>UC_CCC_DA</b>
867 <a name="IDX383"></a>
868 </dt>
869 <dd><p>The canonical combining class value for &ldquo;Double Above&rdquo; characters.
870 </p></dd></dl>
871
872 <dl>
873 <dt><u>Constant:</u> int <b>UC_CCC_IS</b>
874 <a name="IDX384"></a>
875 </dt>
876 <dd><p>The canonical combining class value for &ldquo;Iota Subscript&rdquo; characters.
877 </p></dd></dl>
878
879 <p>The following functions associate canonical combining classes with their name.
880 </p>
881 <dl>
882 <dt><u>Function:</u> const char * <b>uc_combining_class_name</b><i> (int <var>ccc</var>)</i>
883 <a name="IDX385"></a>
884 </dt>
885 <dd><p>Returns the name of a canonical combining class, more precisely, the
886 abbreviated name.
887 Returns NULL if the canonical combining class is a numeric value without a
888 name.
889 </p></dd></dl>
890
891 <dl>
892 <dt><u>Function:</u> const char * <b>uc_combining_class_long_name</b><i> (int <var>ccc</var>)</i>
893 <a name="IDX386"></a>
894 </dt>
895 <dd><p>Returns the long name of a canonical combining class.
896 Returns NULL if the canonical combining class is a numeric value without a
897 name.
898 </p></dd></dl>
899
900 <dl>
901 <dt><u>Function:</u> int <b>uc_combining_class_byname</b><i> (const char *<var>ccc_name</var>)</i>
902 <a name="IDX387"></a>
903 </dt>
904 <dd><p>Returns the canonical combining class given by name, e.g. <code>&quot;BL&quot;</code>, or by
905 long name, e.g. <code>&quot;Below Left&quot;</code>.
906 This lookup ignores spaces, underscores, or hyphens as word separators and is
907 case-insignificant.
908 </p></dd></dl>
909
910 <p>The following function looks up the canonical combining class of a character.
911 </p>
912 <dl>
913 <dt><u>Function:</u> int <b>uc_combining_class</b><i> (ucs4_t <var>uc</var>)</i>
914 <a name="IDX388"></a>
915 </dt>
916 <dd><p>Returns the canonical combining class of a Unicode character.
917 </p></dd></dl>
918
919 <hr size="6">
920 <a name="Bidi-class"></a>
921 <a name="SEC25"></a>
922 <h2 class="section"> <a href="libunistring.html#TOC25">8.3 Bidi class</a> </h2>
923
924 <p>Every Unicode character or code point has a <em>bidi class</em> assigned to it.
925 Before Unicode 4.0, this concept was known as <em>bidirectional category</em>.
926 </p>
927 <p>The bidi class guides the bidirectional algorithm
928 (<a href="http://www.unicode.org/reports/tr9/">http://www.unicode.org/reports/tr9/</a>).  The possible values are
929 the following.
930 </p>
931 <dl>
932 <dt><u>Constant:</u> int <b>UC_BIDI_L</b>
933 <a name="IDX389"></a>
934 </dt>
935 <dd><p>The bidi class for `Left-to-Right`&rdquo; characters.
936 </p></dd></dl>
937
938 <dl>
939 <dt><u>Constant:</u> int <b>UC_BIDI_LRE</b>
940 <a name="IDX390"></a>
941 </dt>
942 <dd><p>The bidi class for &ldquo;Left-to-Right Embedding&rdquo; characters.
943 </p></dd></dl>
944
945 <dl>
946 <dt><u>Constant:</u> int <b>UC_BIDI_LRO</b>
947 <a name="IDX391"></a>
948 </dt>
949 <dd><p>The bidi class for &ldquo;Left-to-Right Override&rdquo; characters.
950 </p></dd></dl>
951
952 <dl>
953 <dt><u>Constant:</u> int <b>UC_BIDI_R</b>
954 <a name="IDX392"></a>
955 </dt>
956 <dd><p>The bidi class for &ldquo;Right-to-Left&rdquo; characters.
957 </p></dd></dl>
958
959 <dl>
960 <dt><u>Constant:</u> int <b>UC_BIDI_AL</b>
961 <a name="IDX393"></a>
962 </dt>
963 <dd><p>The bidi class for &ldquo;Right-to-Left Arabic&rdquo; characters.
964 </p></dd></dl>
965
966 <dl>
967 <dt><u>Constant:</u> int <b>UC_BIDI_RLE</b>
968 <a name="IDX394"></a>
969 </dt>
970 <dd><p>The bidi class for &ldquo;Right-to-Left Embedding&rdquo; characters.
971 </p></dd></dl>
972
973 <dl>
974 <dt><u>Constant:</u> int <b>UC_BIDI_RLO</b>
975 <a name="IDX395"></a>
976 </dt>
977 <dd><p>The bidi class for &ldquo;Right-to-Left Override&rdquo; characters.
978 </p></dd></dl>
979
980 <dl>
981 <dt><u>Constant:</u> int <b>UC_BIDI_PDF</b>
982 <a name="IDX396"></a>
983 </dt>
984 <dd><p>The bidi class for &ldquo;Pop Directional Format&rdquo; characters.
985 </p></dd></dl>
986
987 <dl>
988 <dt><u>Constant:</u> int <b>UC_BIDI_EN</b>
989 <a name="IDX397"></a>
990 </dt>
991 <dd><p>The bidi class for &ldquo;European Number&rdquo; characters.
992 </p></dd></dl>
993
994 <dl>
995 <dt><u>Constant:</u> int <b>UC_BIDI_ES</b>
996 <a name="IDX398"></a>
997 </dt>
998 <dd><p>The bidi class for &ldquo;European Number Separator&rdquo; characters.
999 </p></dd></dl>
1000
1001 <dl>
1002 <dt><u>Constant:</u> int <b>UC_BIDI_ET</b>
1003 <a name="IDX399"></a>
1004 </dt>
1005 <dd><p>The bidi class for &ldquo;European Number Terminator&rdquo; characters.
1006 </p></dd></dl>
1007
1008 <dl>
1009 <dt><u>Constant:</u> int <b>UC_BIDI_AN</b>
1010 <a name="IDX400"></a>
1011 </dt>
1012 <dd><p>The bidi class for &ldquo;Arabic Number&rdquo; characters.
1013 </p></dd></dl>
1014
1015 <dl>
1016 <dt><u>Constant:</u> int <b>UC_BIDI_CS</b>
1017 <a name="IDX401"></a>
1018 </dt>
1019 <dd><p>The bidi class for &ldquo;Common Number Separator&rdquo; characters.
1020 </p></dd></dl>
1021
1022 <dl>
1023 <dt><u>Constant:</u> int <b>UC_BIDI_NSM</b>
1024 <a name="IDX402"></a>
1025 </dt>
1026 <dd><p>The bidi class for &ldquo;Non-Spacing Mark&rdquo; characters.
1027 </p></dd></dl>
1028
1029 <dl>
1030 <dt><u>Constant:</u> int <b>UC_BIDI_BN</b>
1031 <a name="IDX403"></a>
1032 </dt>
1033 <dd><p>The bidi class for &ldquo;Boundary Neutral&rdquo; characters.
1034 </p></dd></dl>
1035
1036 <dl>
1037 <dt><u>Constant:</u> int <b>UC_BIDI_B</b>
1038 <a name="IDX404"></a>
1039 </dt>
1040 <dd><p>The bidi class for &ldquo;Paragraph Separator&rdquo; characters.
1041 </p></dd></dl>
1042
1043 <dl>
1044 <dt><u>Constant:</u> int <b>UC_BIDI_S</b>
1045 <a name="IDX405"></a>
1046 </dt>
1047 <dd><p>The bidi class for &ldquo;Segment Separator&rdquo; characters.
1048 </p></dd></dl>
1049
1050 <dl>
1051 <dt><u>Constant:</u> int <b>UC_BIDI_WS</b>
1052 <a name="IDX406"></a>
1053 </dt>
1054 <dd><p>The bidi class for &ldquo;Whitespace&rdquo; characters.
1055 </p></dd></dl>
1056
1057 <dl>
1058 <dt><u>Constant:</u> int <b>UC_BIDI_ON</b>
1059 <a name="IDX407"></a>
1060 </dt>
1061 <dd><p>The bidi class for &ldquo;Other Neutral&rdquo; characters.
1062 </p></dd></dl>
1063
1064 <p>The following functions implement the association between a bidirectional
1065 category and its name.
1066 </p>
1067 <dl>
1068 <dt><u>Function:</u> const char * <b>uc_bidi_class_name</b><i> (int <var>bidi_class</var>)</i>
1069 <a name="IDX408"></a>
1070 </dt>
1071 <dt><u>Function:</u> const char * <b>uc_bidi_category_name</b><i> (int <var>category</var>)</i>
1072 <a name="IDX409"></a>
1073 </dt>
1074 <dd><p>Returns the name of a bidi class, more precisely, the abbreviated name.
1075 </p></dd></dl>
1076
1077 <dl>
1078 <dt><u>Function:</u> const char * <b>uc_bidi_class_long_name</b><i> (int <var>bidi_class</var>)</i>
1079 <a name="IDX410"></a>
1080 </dt>
1081 <dd><p>Returns the long name of a bidi class.
1082 </p></dd></dl>
1083
1084 <dl>
1085 <dt><u>Function:</u> int <b>uc_bidi_class_byname</b><i> (const char *<var>bidi_class_name</var>)</i>
1086 <a name="IDX411"></a>
1087 </dt>
1088 <dt><u>Function:</u> int <b>uc_bidi_category_byname</b><i> (const char *<var>category_name</var>)</i>
1089 <a name="IDX412"></a>
1090 </dt>
1091 <dd><p>Returns the bidi class given by name, e.g. <code>&quot;LRE&quot;</code>, or by long name,
1092 e.g. <code>&quot;Left-to-Right Embedding&quot;</code>.
1093 This lookup ignores spaces, underscores, or hyphens as word separators and is
1094 case-insignificant.
1095 </p></dd></dl>
1096
1097 <p>The following functions view bidirectional categories as sets of Unicode
1098 characters.
1099 </p>
1100 <dl>
1101 <dt><u>Function:</u> int <b>uc_bidi_class</b><i> (ucs4_t <var>uc</var>)</i>
1102 <a name="IDX413"></a>
1103 </dt>
1104 <dt><u>Function:</u> int <b>uc_bidi_category</b><i> (ucs4_t <var>uc</var>)</i>
1105 <a name="IDX414"></a>
1106 </dt>
1107 <dd><p>Returns the bidi class of a Unicode character.
1108 </p></dd></dl>
1109
1110 <dl>
1111 <dt><u>Function:</u> bool <b>uc_is_bidi_class</b><i> (ucs4_t <var>uc</var>, int <var>bidi_class</var>)</i>
1112 <a name="IDX415"></a>
1113 </dt>
1114 <dt><u>Function:</u> bool <b>uc_is_bidi_category</b><i> (ucs4_t <var>uc</var>, int <var>category</var>)</i>
1115 <a name="IDX416"></a>
1116 </dt>
1117 <dd><p>Tests whether a Unicode character belongs to a given bidi class.
1118 </p></dd></dl>
1119
1120 <hr size="6">
1121 <a name="Decimal-digit-value"></a>
1122 <a name="SEC26"></a>
1123 <h2 class="section"> <a href="libunistring.html#TOC26">8.4 Decimal digit value</a> </h2>
1124
1125 <p>Decimal digits (like the digits from &lsquo;<samp>0</samp>&rsquo; to &lsquo;<samp>9</samp>&rsquo;) exist in many
1126 scripts.  The following function converts a decimal digit character to its
1127 numerical value.
1128 </p>
1129 <dl>
1130 <dt><u>Function:</u> int <b>uc_decimal_value</b><i> (ucs4_t <var>uc</var>)</i>
1131 <a name="IDX417"></a>
1132 </dt>
1133 <dd><p>Returns the decimal digit value of a Unicode character.
1134 The return value is an integer in the range 0..9, or -1 for characters that
1135 do not represent a decimal digit.
1136 </p></dd></dl>
1137
1138 <hr size="6">
1139 <a name="Digit-value"></a>
1140 <a name="SEC27"></a>
1141 <h2 class="section"> <a href="libunistring.html#TOC27">8.5 Digit value</a> </h2>
1142
1143 <p>Digit characters are like decimal digit characters, possibly in special forms,
1144 like as superscript, subscript, or circled.  The following function converts a
1145 digit character to its numerical value.
1146 </p>
1147 <dl>
1148 <dt><u>Function:</u> int <b>uc_digit_value</b><i> (ucs4_t <var>uc</var>)</i>
1149 <a name="IDX418"></a>
1150 </dt>
1151 <dd><p>Returns the digit value of a Unicode character.
1152 The return value is an integer in the range 0..9, or -1 for characters that
1153 do not represent a digit.
1154 </p></dd></dl>
1155
1156 <hr size="6">
1157 <a name="Numeric-value"></a>
1158 <a name="SEC28"></a>
1159 <h2 class="section"> <a href="libunistring.html#TOC28">8.6 Numeric value</a> </h2>
1160
1161 <p>There are also characters that represent numbers without a digit system, like
1162 the Roman numerals, and fractional numbers, like 1/4 or 3/4.
1163 </p>
1164 <p>The following type represents the numeric value of a Unicode character.
1165 </p><dl>
1166 <dt><u>Type:</u> <b>uc_fraction_t</b>
1167 <a name="IDX419"></a>
1168 </dt>
1169 <dd><p>This is a structure type with the following fields:
1170 </p><table><tr><td>&nbsp;</td><td><pre class="smallexample">int numerator;
1171 int denominator;
1172 </pre></td></tr></table>
1173 <p>An integer <var>n</var> is represented by <code>numerator = <var>n</var></code>,
1174 <code>denominator = 1</code>.
1175 </p></dd></dl>
1176
1177 <p>The following function converts a number character to its numerical value.
1178 </p>
1179 <dl>
1180 <dt><u>Function:</u> uc_fraction_t <b>uc_numeric_value</b><i> (ucs4_t <var>uc</var>)</i>
1181 <a name="IDX420"></a>
1182 </dt>
1183 <dd><p>Returns the numeric value of a Unicode character.
1184 The return value is a fraction, or the pseudo-fraction <code>{ 0, 0 }</code> for
1185 characters that do not represent a number.
1186 </p></dd></dl>
1187
1188 <hr size="6">
1189 <a name="Mirrored-character"></a>
1190 <a name="SEC29"></a>
1191 <h2 class="section"> <a href="libunistring.html#TOC29">8.7 Mirrored character</a> </h2>
1192
1193 <p>Character mirroring is used to associate the closing parenthesis character
1194 to the opening parenthesis character, the closing brace character with the
1195 opening brace character, and so on.
1196 </p>
1197 <p>The following function looks up the mirrored character of a Unicode character.
1198 </p>
1199 <dl>
1200 <dt><u>Function:</u> bool <b>uc_mirror_char</b><i> (ucs4_t <var>uc</var>, ucs4_t *<var>puc</var>)</i>
1201 <a name="IDX421"></a>
1202 </dt>
1203 <dd><p>Stores the mirrored character of a Unicode character <var>uc</var> in
1204 <code>*<var>puc</var></code> and returns <code>true</code>, if it exists.  Otherwise it
1205 stores <var>uc</var> unmodified in <code>*<var>puc</var></code> and returns <code>false</code>.
1206 </p></dd></dl>
1207
1208 <hr size="6">
1209 <a name="Arabic-shaping"></a>
1210 <a name="SEC30"></a>
1211 <h2 class="section"> <a href="libunistring.html#TOC30">8.8 Arabic shaping</a> </h2>
1212
1213 <p>When Arabic characters are rendered, after bidi reordering has taken
1214 place, the shape of the glyphs are modified so that many adjacent glyphs
1215 are joined.  Two character properties describe how this &ldquo;Arabic shaping&rdquo;
1216 takes place: the joining type and the joining group.
1217 </p>
1218
1219 <hr size="6">
1220 <a name="Joining-type"></a>
1221 <a name="SEC31"></a>
1222 <h3 class="subsection"> <a href="libunistring.html#TOC31">8.8.1 Joining type of Arabic characters</a> </h3>
1223
1224 <p>The joining type of a character describes on which of the left and right
1225 neighbour characters the character's shape depends, and which of the two
1226 neighbour characters are rendered depending on this character.
1227 </p>
1228 <p>The joining type has the following possible values:
1229 </p>
1230 <dl>
1231 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_U</b>
1232 <a name="IDX422"></a>
1233 </dt>
1234 <dd><p>&ldquo;Non joining&rdquo;: Characters of this joining type prohibit joining.
1235 </p></dd></dl>
1236
1237 <dl>
1238 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_T</b>
1239 <a name="IDX423"></a>
1240 </dt>
1241 <dd><p>&ldquo;Transparent&rdquo;: Characters of this joining type are skipped when
1242 considering joining.
1243 </p></dd></dl>
1244
1245 <dl>
1246 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_C</b>
1247 <a name="IDX424"></a>
1248 </dt>
1249 <dd><p>&ldquo;Join causing&rdquo;: Characters of this joining type cause their neighbour
1250 characters to change their shapes but don't change their own shape.
1251 </p></dd></dl>
1252
1253 <dl>
1254 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_L</b>
1255 <a name="IDX425"></a>
1256 </dt>
1257 <dd><p>&ldquo;Left joining&rdquo;: Characters of this joining type have two shapes,
1258 isolated and initial.  Such characters currently don't exist.
1259 </p></dd></dl>
1260
1261 <dl>
1262 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_R</b>
1263 <a name="IDX426"></a>
1264 </dt>
1265 <dd><p>&ldquo;Right joining&rdquo;: Characters of this joining type have two shapes,
1266 isolated and final.
1267 </p></dd></dl>
1268
1269 <dl>
1270 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_D</b>
1271 <a name="IDX427"></a>
1272 </dt>
1273 <dd><p>&ldquo;Dual joining&rdquo;: Characters of this joining type have four shapes,
1274 initial, medial, final, and isolated.
1275 </p></dd></dl>
1276
1277 <p>The following functions implement the association between a joining type
1278 and its name.
1279 </p>
1280 <dl>
1281 <dt><u>Function:</u> const char * <b>uc_joining_type_name</b><i> (int <var>joining_type</var>)</i>
1282 <a name="IDX428"></a>
1283 </dt>
1284 <dd><p>Returns the name of a joining type.
1285 </p></dd></dl>
1286
1287 <dl>
1288 <dt><u>Function:</u> const char * <b>uc_joining_type_long_name</b><i> (int <var>joining_type</var>)</i>
1289 <a name="IDX429"></a>
1290 </dt>
1291 <dd><p>Returns the long name of a joining type.
1292 </p></dd></dl>
1293
1294 <dl>
1295 <dt><u>Function:</u> int <b>uc_joining_type_byname</b><i> (const char *<var>joining_type_name</var>)</i>
1296 <a name="IDX430"></a>
1297 </dt>
1298 <dd><p>Returns the joining type given by name, e.g. <code>&quot;D&quot;</code>, or by long name,
1299 e.g. <code>&quot;Dual Joining</code>.
1300 This lookup ignores spaces, underscores, or hyphens as word separators and is
1301 case-insignificant.
1302 </p></dd></dl>
1303
1304 <p>The following function gives the joining type of every Unicode character.
1305 </p>
1306 <dl>
1307 <dt><u>Function:</u> int <b>uc_joining_type</b><i> (ucs4_t <var>uc</var>)</i>
1308 <a name="IDX431"></a>
1309 </dt>
1310 <dd><p>Returns the joining type of a Unicode character.
1311 </p></dd></dl>
1312
1313 <hr size="6">
1314 <a name="Joining-group"></a>
1315 <a name="SEC32"></a>
1316 <h3 class="subsection"> <a href="libunistring.html#TOC32">8.8.2 Joining group of Arabic characters</a> </h3>
1317
1318 <p>The joining group of a character describes how the character's shape
1319 is modified in the four contexts of dual-joining characters or in the
1320 two contexts of right-joining characters.
1321 </p>
1322 <p>The joining group has the following possible values:
1323 </p>
1324 <dl>
1325 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_NONE</b>
1326 <a name="IDX432"></a>
1327 </dt>
1328 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_AIN</b>
1329 <a name="IDX433"></a>
1330 </dt>
1331 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_ALAPH</b>
1332 <a name="IDX434"></a>
1333 </dt>
1334 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_ALEF</b>
1335 <a name="IDX435"></a>
1336 </dt>
1337 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_BEH</b>
1338 <a name="IDX436"></a>
1339 </dt>
1340 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_BETH</b>
1341 <a name="IDX437"></a>
1342 </dt>
1343 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE</b>
1344 <a name="IDX438"></a>
1345 </dt>
1346 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_DAL</b>
1347 <a name="IDX439"></a>
1348 </dt>
1349 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_DALATH_RISH</b>
1350 <a name="IDX440"></a>
1351 </dt>
1352 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_E</b>
1353 <a name="IDX441"></a>
1354 </dt>
1355 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_FARSI_YEH</b>
1356 <a name="IDX442"></a>
1357 </dt>
1358 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_FE</b>
1359 <a name="IDX443"></a>
1360 </dt>
1361 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_FEH</b>
1362 <a name="IDX444"></a>
1363 </dt>
1364 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_FINAL_SEMKATH</b>
1365 <a name="IDX445"></a>
1366 </dt>
1367 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_GAF</b>
1368 <a name="IDX446"></a>
1369 </dt>
1370 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_GAMAL</b>
1371 <a name="IDX447"></a>
1372 </dt>
1373 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HAH</b>
1374 <a name="IDX448"></a>
1375 </dt>
1376 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HE</b>
1377 <a name="IDX449"></a>
1378 </dt>
1379 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HEH</b>
1380 <a name="IDX450"></a>
1381 </dt>
1382 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HEH_GOAL</b>
1383 <a name="IDX451"></a>
1384 </dt>
1385 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HETH</b>
1386 <a name="IDX452"></a>
1387 </dt>
1388 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_KAF</b>
1389 <a name="IDX453"></a>
1390 </dt>
1391 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_KAPH</b>
1392 <a name="IDX454"></a>
1393 </dt>
1394 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_KHAPH</b>
1395 <a name="IDX455"></a>
1396 </dt>
1397 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_KNOTTED_HEH</b>
1398 <a name="IDX456"></a>
1399 </dt>
1400 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_LAM</b>
1401 <a name="IDX457"></a>
1402 </dt>
1403 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_LAMADH</b>
1404 <a name="IDX458"></a>
1405 </dt>
1406 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MEEM</b>
1407 <a name="IDX459"></a>
1408 </dt>
1409 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MIM</b>
1410 <a name="IDX460"></a>
1411 </dt>
1412 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_NOON</b>
1413 <a name="IDX461"></a>
1414 </dt>
1415 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_NUN</b>
1416 <a name="IDX462"></a>
1417 </dt>
1418 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_NYA</b>
1419 <a name="IDX463"></a>
1420 </dt>
1421 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_PE</b>
1422 <a name="IDX464"></a>
1423 </dt>
1424 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_QAF</b>
1425 <a name="IDX465"></a>
1426 </dt>
1427 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_QAPH</b>
1428 <a name="IDX466"></a>
1429 </dt>
1430 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_REH</b>
1431 <a name="IDX467"></a>
1432 </dt>
1433 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_REVERSED_PE</b>
1434 <a name="IDX468"></a>
1435 </dt>
1436 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SAD</b>
1437 <a name="IDX469"></a>
1438 </dt>
1439 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SADHE</b>
1440 <a name="IDX470"></a>
1441 </dt>
1442 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SEEN</b>
1443 <a name="IDX471"></a>
1444 </dt>
1445 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SEMKATH</b>
1446 <a name="IDX472"></a>
1447 </dt>
1448 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SHIN</b>
1449 <a name="IDX473"></a>
1450 </dt>
1451 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SWASH_KAF</b>
1452 <a name="IDX474"></a>
1453 </dt>
1454 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SYRIAC_WAW</b>
1455 <a name="IDX475"></a>
1456 </dt>
1457 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_TAH</b>
1458 <a name="IDX476"></a>
1459 </dt>
1460 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_TAW</b>
1461 <a name="IDX477"></a>
1462 </dt>
1463 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_TEH_MARBUTA</b>
1464 <a name="IDX478"></a>
1465 </dt>
1466 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_TEH_MARBUTA_GOAL</b>
1467 <a name="IDX479"></a>
1468 </dt>
1469 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_TETH</b>
1470 <a name="IDX480"></a>
1471 </dt>
1472 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_WAW</b>
1473 <a name="IDX481"></a>
1474 </dt>
1475 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_YEH</b>
1476 <a name="IDX482"></a>
1477 </dt>
1478 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_YEH_BARREE</b>
1479 <a name="IDX483"></a>
1480 </dt>
1481 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_YEH_WITH_TAIL</b>
1482 <a name="IDX484"></a>
1483 </dt>
1484 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_YUDH</b>
1485 <a name="IDX485"></a>
1486 </dt>
1487 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_YUDH_HE</b>
1488 <a name="IDX486"></a>
1489 </dt>
1490 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_ZAIN</b>
1491 <a name="IDX487"></a>
1492 </dt>
1493 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_ZHAIN</b>
1494 <a name="IDX488"></a>
1495 </dt>
1496 </dl>
1497
1498 <p>The following functions implement the association between a joining group
1499 and its name.
1500 </p>
1501 <dl>
1502 <dt><u>Function:</u> const char * <b>uc_joining_group_name</b><i> (int <var>joining_group</var>)</i>
1503 <a name="IDX489"></a>
1504 </dt>
1505 <dd><p>Returns the name of a joining group.
1506 </p></dd></dl>
1507
1508 <dl>
1509 <dt><u>Function:</u> int <b>uc_joining_group_byname</b><i> (const char *<var>joining_group_name</var>)</i>
1510 <a name="IDX490"></a>
1511 </dt>
1512 <dd><p>Returns the joining group given by name, e.g. <code>&quot;Teh_Marbuta&quot;</code>.
1513 This lookup ignores spaces, underscores, or hyphens as word separators and is
1514 case-insignificant.
1515 </p></dd></dl>
1516
1517 <p>The following function gives the joining group of every Unicode character.
1518 </p>
1519 <dl>
1520 <dt><u>Function:</u> int <b>uc_joining_group</b><i> (ucs4_t <var>uc</var>)</i>
1521 <a name="IDX491"></a>
1522 </dt>
1523 <dd><p>Returns the joining group of a Unicode character.
1524 </p></dd></dl>
1525
1526 <hr size="6">
1527 <a name="Properties"></a>
1528 <a name="SEC33"></a>
1529 <h2 class="section"> <a href="libunistring.html#TOC33">8.9 Properties</a> </h2>
1530
1531 <p>This section defines boolean properties of Unicode characters.  This
1532 means, a character either has the given property or does not have it.
1533 In other words, the property can be viewed as a subset of the set of
1534 Unicode characters.
1535 </p>
1536 <p>The GNU libunistring library provides two kinds of API for working with
1537 properties.  The object oriented API uses a type <code>uc_property_t</code>
1538 to designate a property.  In the function-based API, which is a bit more
1539 low level, a property is merely a function.
1540 </p>
1541
1542 <hr size="6">
1543 <a name="Properties-as-objects"></a>
1544 <a name="SEC34"></a>
1545 <h3 class="subsection"> <a href="libunistring.html#TOC34">8.9.1 Properties as objects &ndash; the object oriented API</a> </h3>
1546
1547 <p>The following type designates a property on Unicode characters.
1548 </p>
1549 <dl>
1550 <dt><u>Type:</u> <b>uc_property_t</b>
1551 <a name="IDX492"></a>
1552 </dt>
1553 <dd><p>This data type denotes a boolean property on Unicode characters. It is an
1554 immediate type that can be copied by simple assignment, without involving
1555 memory allocation.  It is not an array type.
1556 </p></dd></dl>
1557
1558 <p>Many Unicode properties are predefined.
1559 </p>
1560 <p>The following are general properties.
1561 </p>
1562 <dl>
1563 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_WHITE_SPACE</b>
1564 <a name="IDX493"></a>
1565 </dt>
1566 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ALPHABETIC</b>
1567 <a name="IDX494"></a>
1568 </dt>
1569 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_ALPHABETIC</b>
1570 <a name="IDX495"></a>
1571 </dt>
1572 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_NOT_A_CHARACTER</b>
1573 <a name="IDX496"></a>
1574 </dt>
1575 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT</b>
1576 <a name="IDX497"></a>
1577 </dt>
1578 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT</b>
1579 <a name="IDX498"></a>
1580 </dt>
1581 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_DEPRECATED</b>
1582 <a name="IDX499"></a>
1583 </dt>
1584 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_LOGICAL_ORDER_EXCEPTION</b>
1585 <a name="IDX500"></a>
1586 </dt>
1587 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_VARIATION_SELECTOR</b>
1588 <a name="IDX501"></a>
1589 </dt>
1590 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PRIVATE_USE</b>
1591 <a name="IDX502"></a>
1592 </dt>
1593 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_UNASSIGNED_CODE_VALUE</b>
1594 <a name="IDX503"></a>
1595 </dt>
1596 </dl>
1597
1598 <p>The following properties are related to case folding.
1599 </p>
1600 <dl>
1601 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_UPPERCASE</b>
1602 <a name="IDX504"></a>
1603 </dt>
1604 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_UPPERCASE</b>
1605 <a name="IDX505"></a>
1606 </dt>
1607 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_LOWERCASE</b>
1608 <a name="IDX506"></a>
1609 </dt>
1610 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_LOWERCASE</b>
1611 <a name="IDX507"></a>
1612 </dt>
1613 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_TITLECASE</b>
1614 <a name="IDX508"></a>
1615 </dt>
1616 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CASED</b>
1617 <a name="IDX509"></a>
1618 </dt>
1619 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CASE_IGNORABLE</b>
1620 <a name="IDX510"></a>
1621 </dt>
1622 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CHANGES_WHEN_LOWERCASED</b>
1623 <a name="IDX511"></a>
1624 </dt>
1625 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CHANGES_WHEN_UPPERCASED</b>
1626 <a name="IDX512"></a>
1627 </dt>
1628 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CHANGES_WHEN_TITLECASED</b>
1629 <a name="IDX513"></a>
1630 </dt>
1631 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CHANGES_WHEN_CASEFOLDED</b>
1632 <a name="IDX514"></a>
1633 </dt>
1634 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CHANGES_WHEN_CASEMAPPED</b>
1635 <a name="IDX515"></a>
1636 </dt>
1637 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_SOFT_DOTTED</b>
1638 <a name="IDX516"></a>
1639 </dt>
1640 </dl>
1641
1642 <p>The following properties are related to identifiers.
1643 </p>
1644 <dl>
1645 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ID_START</b>
1646 <a name="IDX517"></a>
1647 </dt>
1648 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_ID_START</b>
1649 <a name="IDX518"></a>
1650 </dt>
1651 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ID_CONTINUE</b>
1652 <a name="IDX519"></a>
1653 </dt>
1654 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_ID_CONTINUE</b>
1655 <a name="IDX520"></a>
1656 </dt>
1657 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_XID_START</b>
1658 <a name="IDX521"></a>
1659 </dt>
1660 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_XID_CONTINUE</b>
1661 <a name="IDX522"></a>
1662 </dt>
1663 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PATTERN_WHITE_SPACE</b>
1664 <a name="IDX523"></a>
1665 </dt>
1666 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PATTERN_SYNTAX</b>
1667 <a name="IDX524"></a>
1668 </dt>
1669 </dl>
1670
1671 <p>The following properties have an influence on shaping and rendering.
1672 </p>
1673 <dl>
1674 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_JOIN_CONTROL</b>
1675 <a name="IDX525"></a>
1676 </dt>
1677 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_GRAPHEME_BASE</b>
1678 <a name="IDX526"></a>
1679 </dt>
1680 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_GRAPHEME_EXTEND</b>
1681 <a name="IDX527"></a>
1682 </dt>
1683 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_GRAPHEME_EXTEND</b>
1684 <a name="IDX528"></a>
1685 </dt>
1686 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_GRAPHEME_LINK</b>
1687 <a name="IDX529"></a>
1688 </dt>
1689 </dl>
1690
1691 <p>The following properties relate to bidirectional reordering.
1692 </p>
1693 <dl>
1694 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_CONTROL</b>
1695 <a name="IDX530"></a>
1696 </dt>
1697 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_LEFT_TO_RIGHT</b>
1698 <a name="IDX531"></a>
1699 </dt>
1700 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT</b>
1701 <a name="IDX532"></a>
1702 </dt>
1703 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT</b>
1704 <a name="IDX533"></a>
1705 </dt>
1706 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_EUROPEAN_DIGIT</b>
1707 <a name="IDX534"></a>
1708 </dt>
1709 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR</b>
1710 <a name="IDX535"></a>
1711 </dt>
1712 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR</b>
1713 <a name="IDX536"></a>
1714 </dt>
1715 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_ARABIC_DIGIT</b>
1716 <a name="IDX537"></a>
1717 </dt>
1718 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_COMMON_SEPARATOR</b>
1719 <a name="IDX538"></a>
1720 </dt>
1721 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_BLOCK_SEPARATOR</b>
1722 <a name="IDX539"></a>
1723 </dt>
1724 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_SEGMENT_SEPARATOR</b>
1725 <a name="IDX540"></a>
1726 </dt>
1727 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_WHITESPACE</b>
1728 <a name="IDX541"></a>
1729 </dt>
1730 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_NON_SPACING_MARK</b>
1731 <a name="IDX542"></a>
1732 </dt>
1733 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL</b>
1734 <a name="IDX543"></a>
1735 </dt>
1736 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_PDF</b>
1737 <a name="IDX544"></a>
1738 </dt>
1739 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE</b>
1740 <a name="IDX545"></a>
1741 </dt>
1742 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_OTHER_NEUTRAL</b>
1743 <a name="IDX546"></a>
1744 </dt>
1745 </dl>
1746
1747 <p>The following properties deal with number representations.
1748 </p>
1749 <dl>
1750 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_HEX_DIGIT</b>
1751 <a name="IDX547"></a>
1752 </dt>
1753 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ASCII_HEX_DIGIT</b>
1754 <a name="IDX548"></a>
1755 </dt>
1756 </dl>
1757
1758 <p>The following properties deal with CJK.
1759 </p>
1760 <dl>
1761 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_IDEOGRAPHIC</b>
1762 <a name="IDX549"></a>
1763 </dt>
1764 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_UNIFIED_IDEOGRAPH</b>
1765 <a name="IDX550"></a>
1766 </dt>
1767 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_RADICAL</b>
1768 <a name="IDX551"></a>
1769 </dt>
1770 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_IDS_BINARY_OPERATOR</b>
1771 <a name="IDX552"></a>
1772 </dt>
1773 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_IDS_TRINARY_OPERATOR</b>
1774 <a name="IDX553"></a>
1775 </dt>
1776 </dl>
1777
1778 <p>Other miscellaneous properties are:
1779 </p>
1780 <dl>
1781 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ZERO_WIDTH</b>
1782 <a name="IDX554"></a>
1783 </dt>
1784 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_SPACE</b>
1785 <a name="IDX555"></a>
1786 </dt>
1787 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_NON_BREAK</b>
1788 <a name="IDX556"></a>
1789 </dt>
1790 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ISO_CONTROL</b>
1791 <a name="IDX557"></a>
1792 </dt>
1793 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_FORMAT_CONTROL</b>
1794 <a name="IDX558"></a>
1795 </dt>
1796 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_DASH</b>
1797 <a name="IDX559"></a>
1798 </dt>
1799 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_HYPHEN</b>
1800 <a name="IDX560"></a>
1801 </dt>
1802 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PUNCTUATION</b>
1803 <a name="IDX561"></a>
1804 </dt>
1805 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_LINE_SEPARATOR</b>
1806 <a name="IDX562"></a>
1807 </dt>
1808 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PARAGRAPH_SEPARATOR</b>
1809 <a name="IDX563"></a>
1810 </dt>
1811 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_QUOTATION_MARK</b>
1812 <a name="IDX564"></a>
1813 </dt>
1814 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_SENTENCE_TERMINAL</b>
1815 <a name="IDX565"></a>
1816 </dt>
1817 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_TERMINAL_PUNCTUATION</b>
1818 <a name="IDX566"></a>
1819 </dt>
1820 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CURRENCY_SYMBOL</b>
1821 <a name="IDX567"></a>
1822 </dt>
1823 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_MATH</b>
1824 <a name="IDX568"></a>
1825 </dt>
1826 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_MATH</b>
1827 <a name="IDX569"></a>
1828 </dt>
1829 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PAIRED_PUNCTUATION</b>
1830 <a name="IDX570"></a>
1831 </dt>
1832 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_LEFT_OF_PAIR</b>
1833 <a name="IDX571"></a>
1834 </dt>
1835 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_COMBINING</b>
1836 <a name="IDX572"></a>
1837 </dt>
1838 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_COMPOSITE</b>
1839 <a name="IDX573"></a>
1840 </dt>
1841 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_DECIMAL_DIGIT</b>
1842 <a name="IDX574"></a>
1843 </dt>
1844 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_NUMERIC</b>
1845 <a name="IDX575"></a>
1846 </dt>
1847 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_DIACRITIC</b>
1848 <a name="IDX576"></a>
1849 </dt>
1850 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_EXTENDER</b>
1851 <a name="IDX577"></a>
1852 </dt>
1853 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_IGNORABLE_CONTROL</b>
1854 <a name="IDX578"></a>
1855 </dt>
1856 </dl>
1857
1858 <p>The following function looks up a property by its name.
1859 </p>
1860 <dl>
1861 <dt><u>Function:</u> uc_property_t <b>uc_property_byname</b><i> (const char *<var>property_name</var>)</i>
1862 <a name="IDX579"></a>
1863 </dt>
1864 <dd><p>Returns the property given by name, e.g. <code>&quot;White space&quot;</code>.  If a property
1865 with the given name exists, the result will satisfy the
1866 <code>uc_property_is_valid</code> predicate.  Otherwise the result will not satisfy
1867 this predicate and must not be passed to functions that expect an
1868 <code>uc_property_t</code> argument.
1869 </p>
1870 <p>This lookup ignores spaces, underscores, or hyphens as word separators, is
1871 case-insignificant, and supports the aliases listed in Unicode's
1872 &lsquo;<tt>PropertyAliases.txt</tt>&rsquo; file.
1873 </p>
1874 <p>This function references a big table of all predefined properties.  Its use
1875 can significantly increase the size of your application.
1876 </p></dd></dl>
1877
1878 <dl>
1879 <dt><u>Function:</u> bool <b>uc_property_is_valid</b><i> (uc_property_t property)</i>
1880 <a name="IDX580"></a>
1881 </dt>
1882 <dd><p>Returns <code>true</code> when the given property is valid, or <code>false</code>
1883 otherwise.
1884 </p></dd></dl>
1885
1886 <p>The following function views a property as a set of Unicode characters.
1887 </p>
1888 <dl>
1889 <dt><u>Function:</u> bool <b>uc_is_property</b><i> (ucs4_t <var>uc</var>, uc_property_t <var>property</var>)</i>
1890 <a name="IDX581"></a>
1891 </dt>
1892 <dd><p>Tests whether the Unicode character <var>uc</var> has the given property.
1893 </p></dd></dl>
1894
1895 <hr size="6">
1896 <a name="Properties-as-functions"></a>
1897 <a name="SEC35"></a>
1898 <h3 class="subsection"> <a href="libunistring.html#TOC35">8.9.2 Properties as functions &ndash; the functional API</a> </h3>
1899
1900 <p>The following are general properties.
1901 </p>
1902 <dl>
1903 <dt><u>Function:</u> bool <b>uc_is_property_white_space</b><i> (ucs4_t <var>uc</var>)</i>
1904 <a name="IDX582"></a>
1905 </dt>
1906 <dt><u>Function:</u> bool <b>uc_is_property_alphabetic</b><i> (ucs4_t <var>uc</var>)</i>
1907 <a name="IDX583"></a>
1908 </dt>
1909 <dt><u>Function:</u> bool <b>uc_is_property_other_alphabetic</b><i> (ucs4_t <var>uc</var>)</i>
1910 <a name="IDX584"></a>
1911 </dt>
1912 <dt><u>Function:</u> bool <b>uc_is_property_not_a_character</b><i> (ucs4_t <var>uc</var>)</i>
1913 <a name="IDX585"></a>
1914 </dt>
1915 <dt><u>Function:</u> bool <b>uc_is_property_default_ignorable_code_point</b><i> (ucs4_t <var>uc</var>)</i>
1916 <a name="IDX586"></a>
1917 </dt>
1918 <dt><u>Function:</u> bool <b>uc_is_property_other_default_ignorable_code_point</b><i> (ucs4_t <var>uc</var>)</i>
1919 <a name="IDX587"></a>
1920 </dt>
1921 <dt><u>Function:</u> bool <b>uc_is_property_deprecated</b><i> (ucs4_t <var>uc</var>)</i>
1922 <a name="IDX588"></a>
1923 </dt>
1924 <dt><u>Function:</u> bool <b>uc_is_property_logical_order_exception</b><i> (ucs4_t <var>uc</var>)</i>
1925 <a name="IDX589"></a>
1926 </dt>
1927 <dt><u>Function:</u> bool <b>uc_is_property_variation_selector</b><i> (ucs4_t <var>uc</var>)</i>
1928 <a name="IDX590"></a>
1929 </dt>
1930 <dt><u>Function:</u> bool <b>uc_is_property_private_use</b><i> (ucs4_t <var>uc</var>)</i>
1931 <a name="IDX591"></a>
1932 </dt>
1933 <dt><u>Function:</u> bool <b>uc_is_property_unassigned_code_value</b><i> (ucs4_t <var>uc</var>)</i>
1934 <a name="IDX592"></a>
1935 </dt>
1936 </dl>
1937
1938 <p>The following properties are related to case folding.
1939 </p>
1940 <dl>
1941 <dt><u>Function:</u> bool <b>uc_is_property_uppercase</b><i> (ucs4_t <var>uc</var>)</i>
1942 <a name="IDX593"></a>
1943 </dt>
1944 <dt><u>Function:</u> bool <b>uc_is_property_other_uppercase</b><i> (ucs4_t <var>uc</var>)</i>
1945 <a name="IDX594"></a>
1946 </dt>
1947 <dt><u>Function:</u> bool <b>uc_is_property_lowercase</b><i> (ucs4_t <var>uc</var>)</i>
1948 <a name="IDX595"></a>
1949 </dt>
1950 <dt><u>Function:</u> bool <b>uc_is_property_other_lowercase</b><i> (ucs4_t <var>uc</var>)</i>
1951 <a name="IDX596"></a>
1952 </dt>
1953 <dt><u>Function:</u> bool <b>uc_is_property_titlecase</b><i> (ucs4_t <var>uc</var>)</i>
1954 <a name="IDX597"></a>
1955 </dt>
1956 <dt><u>Function:</u> bool <b>uc_is_property_cased</b><i> (ucs4_t <var>uc</var>)</i>
1957 <a name="IDX598"></a>
1958 </dt>
1959 <dt><u>Function:</u> bool <b>uc_is_property_case_ignorable</b><i> (ucs4_t <var>uc</var>)</i>
1960 <a name="IDX599"></a>
1961 </dt>
1962 <dt><u>Function:</u> bool <b>uc_is_property_changes_when_lowercased</b><i> (ucs4_t <var>uc</var>)</i>
1963 <a name="IDX600"></a>
1964 </dt>
1965 <dt><u>Function:</u> bool <b>uc_is_property_changes_when_uppercased</b><i> (ucs4_t <var>uc</var>)</i>
1966 <a name="IDX601"></a>
1967 </dt>
1968 <dt><u>Function:</u> bool <b>uc_is_property_changes_when_titlecased</b><i> (ucs4_t <var>uc</var>)</i>
1969 <a name="IDX602"></a>
1970 </dt>
1971 <dt><u>Function:</u> bool <b>uc_is_property_changes_when_casefolded</b><i> (ucs4_t <var>uc</var>)</i>
1972 <a name="IDX603"></a>
1973 </dt>
1974 <dt><u>Function:</u> bool <b>uc_is_property_changes_when_casemapped</b><i> (ucs4_t <var>uc</var>)</i>
1975 <a name="IDX604"></a>
1976 </dt>
1977 <dt><u>Function:</u> bool <b>uc_is_property_soft_dotted</b><i> (ucs4_t <var>uc</var>)</i>
1978 <a name="IDX605"></a>
1979 </dt>
1980 </dl>
1981
1982 <p>The following properties are related to identifiers.
1983 </p>
1984 <dl>
1985 <dt><u>Function:</u> bool <b>uc_is_property_id_start</b><i> (ucs4_t <var>uc</var>)</i>
1986 <a name="IDX606"></a>
1987 </dt>
1988 <dt><u>Function:</u> bool <b>uc_is_property_other_id_start</b><i> (ucs4_t <var>uc</var>)</i>
1989 <a name="IDX607"></a>
1990 </dt>
1991 <dt><u>Function:</u> bool <b>uc_is_property_id_continue</b><i> (ucs4_t <var>uc</var>)</i>
1992 <a name="IDX608"></a>
1993 </dt>
1994 <dt><u>Function:</u> bool <b>uc_is_property_other_id_continue</b><i> (ucs4_t <var>uc</var>)</i>
1995 <a name="IDX609"></a>
1996 </dt>
1997 <dt><u>Function:</u> bool <b>uc_is_property_xid_start</b><i> (ucs4_t <var>uc</var>)</i>
1998 <a name="IDX610"></a>
1999 </dt>
2000 <dt><u>Function:</u> bool <b>uc_is_property_xid_continue</b><i> (ucs4_t <var>uc</var>)</i>
2001 <a name="IDX611"></a>
2002 </dt>
2003 <dt><u>Function:</u> bool <b>uc_is_property_pattern_white_space</b><i> (ucs4_t <var>uc</var>)</i>
2004 <a name="IDX612"></a>
2005 </dt>
2006 <dt><u>Function:</u> bool <b>uc_is_property_pattern_syntax</b><i> (ucs4_t <var>uc</var>)</i>
2007 <a name="IDX613"></a>
2008 </dt>
2009 </dl>
2010
2011 <p>The following properties have an influence on shaping and rendering.
2012 </p>
2013 <dl>
2014 <dt><u>Function:</u> bool <b>uc_is_property_join_control</b><i> (ucs4_t <var>uc</var>)</i>
2015 <a name="IDX614"></a>
2016 </dt>
2017 <dt><u>Function:</u> bool <b>uc_is_property_grapheme_base</b><i> (ucs4_t <var>uc</var>)</i>
2018 <a name="IDX615"></a>
2019 </dt>
2020 <dt><u>Function:</u> bool <b>uc_is_property_grapheme_extend</b><i> (ucs4_t <var>uc</var>)</i>
2021 <a name="IDX616"></a>
2022 </dt>
2023 <dt><u>Function:</u> bool <b>uc_is_property_other_grapheme_extend</b><i> (ucs4_t <var>uc</var>)</i>
2024 <a name="IDX617"></a>
2025 </dt>
2026 <dt><u>Function:</u> bool <b>uc_is_property_grapheme_link</b><i> (ucs4_t <var>uc</var>)</i>
2027 <a name="IDX618"></a>
2028 </dt>
2029 </dl>
2030
2031 <p>The following properties relate to bidirectional reordering.
2032 </p>
2033 <dl>
2034 <dt><u>Function:</u> bool <b>uc_is_property_bidi_control</b><i> (ucs4_t <var>uc</var>)</i>
2035 <a name="IDX619"></a>
2036 </dt>
2037 <dt><u>Function:</u> bool <b>uc_is_property_bidi_left_to_right</b><i> (ucs4_t <var>uc</var>)</i>
2038 <a name="IDX620"></a>
2039 </dt>
2040 <dt><u>Function:</u> bool <b>uc_is_property_bidi_hebrew_right_to_left</b><i> (ucs4_t <var>uc</var>)</i>
2041 <a name="IDX621"></a>
2042 </dt>
2043 <dt><u>Function:</u> bool <b>uc_is_property_bidi_arabic_right_to_left</b><i> (ucs4_t <var>uc</var>)</i>
2044 <a name="IDX622"></a>
2045 </dt>
2046 <dt><u>Function:</u> bool <b>uc_is_property_bidi_european_digit</b><i> (ucs4_t <var>uc</var>)</i>
2047 <a name="IDX623"></a>
2048 </dt>
2049 <dt><u>Function:</u> bool <b>uc_is_property_bidi_eur_num_separator</b><i> (ucs4_t <var>uc</var>)</i>
2050 <a name="IDX624"></a>
2051 </dt>
2052 <dt><u>Function:</u> bool <b>uc_is_property_bidi_eur_num_terminator</b><i> (ucs4_t <var>uc</var>)</i>
2053 <a name="IDX625"></a>
2054 </dt>
2055 <dt><u>Function:</u> bool <b>uc_is_property_bidi_arabic_digit</b><i> (ucs4_t <var>uc</var>)</i>
2056 <a name="IDX626"></a>
2057 </dt>
2058 <dt><u>Function:</u> bool <b>uc_is_property_bidi_common_separator</b><i> (ucs4_t <var>uc</var>)</i>
2059 <a name="IDX627"></a>
2060 </dt>
2061 <dt><u>Function:</u> bool <b>uc_is_property_bidi_block_separator</b><i> (ucs4_t <var>uc</var>)</i>
2062 <a name="IDX628"></a>
2063 </dt>
2064 <dt><u>Function:</u> bool <b>uc_is_property_bidi_segment_separator</b><i> (ucs4_t <var>uc</var>)</i>
2065 <a name="IDX629"></a>
2066 </dt>
2067 <dt><u>Function:</u> bool <b>uc_is_property_bidi_whitespace</b><i> (ucs4_t <var>uc</var>)</i>
2068 <a name="IDX630"></a>
2069 </dt>
2070 <dt><u>Function:</u> bool <b>uc_is_property_bidi_non_spacing_mark</b><i> (ucs4_t <var>uc</var>)</i>
2071 <a name="IDX631"></a>
2072 </dt>
2073 <dt><u>Function:</u> bool <b>uc_is_property_bidi_boundary_neutral</b><i> (ucs4_t <var>uc</var>)</i>
2074 <a name="IDX632"></a>
2075 </dt>
2076 <dt><u>Function:</u> bool <b>uc_is_property_bidi_pdf</b><i> (ucs4_t <var>uc</var>)</i>
2077 <a name="IDX633"></a>
2078 </dt>
2079 <dt><u>Function:</u> bool <b>uc_is_property_bidi_embedding_or_override</b><i> (ucs4_t <var>uc</var>)</i>
2080 <a name="IDX634"></a>
2081 </dt>
2082 <dt><u>Function:</u> bool <b>uc_is_property_bidi_other_neutral</b><i> (ucs4_t <var>uc</var>)</i>
2083 <a name="IDX635"></a>
2084 </dt>
2085 </dl>
2086
2087 <p>The following properties deal with number representations.
2088 </p>
2089 <dl>
2090 <dt><u>Function:</u> bool <b>uc_is_property_hex_digit</b><i> (ucs4_t <var>uc</var>)</i>
2091 <a name="IDX636"></a>
2092 </dt>
2093 <dt><u>Function:</u> bool <b>uc_is_property_ascii_hex_digit</b><i> (ucs4_t <var>uc</var>)</i>
2094 <a name="IDX637"></a>
2095 </dt>
2096 </dl>
2097
2098 <p>The following properties deal with CJK.
2099 </p>
2100 <dl>
2101 <dt><u>Function:</u> bool <b>uc_is_property_ideographic</b><i> (ucs4_t <var>uc</var>)</i>
2102 <a name="IDX638"></a>
2103 </dt>
2104 <dt><u>Function:</u> bool <b>uc_is_property_unified_ideograph</b><i> (ucs4_t <var>uc</var>)</i>
2105 <a name="IDX639"></a>
2106 </dt>
2107 <dt><u>Function:</u> bool <b>uc_is_property_radical</b><i> (ucs4_t <var>uc</var>)</i>
2108 <a name="IDX640"></a>
2109 </dt>
2110 <dt><u>Function:</u> bool <b>uc_is_property_ids_binary_operator</b><i> (ucs4_t <var>uc</var>)</i>
2111 <a name="IDX641"></a>
2112 </dt>
2113 <dt><u>Function:</u> bool <b>uc_is_property_ids_trinary_operator</b><i> (ucs4_t <var>uc</var>)</i>
2114 <a name="IDX642"></a>
2115 </dt>
2116 </dl>
2117
2118 <p>Other miscellaneous properties are:
2119 </p>
2120 <dl>
2121 <dt><u>Function:</u> bool <b>uc_is_property_zero_width</b><i> (ucs4_t <var>uc</var>)</i>
2122 <a name="IDX643"></a>
2123 </dt>
2124 <dt><u>Function:</u> bool <b>uc_is_property_space</b><i> (ucs4_t <var>uc</var>)</i>
2125 <a name="IDX644"></a>
2126 </dt>
2127 <dt><u>Function:</u> bool <b>uc_is_property_non_break</b><i> (ucs4_t <var>uc</var>)</i>
2128 <a name="IDX645"></a>
2129 </dt>
2130 <dt><u>Function:</u> bool <b>uc_is_property_iso_control</b><i> (ucs4_t <var>uc</var>)</i>
2131 <a name="IDX646"></a>
2132 </dt>
2133 <dt><u>Function:</u> bool <b>uc_is_property_format_control</b><i> (ucs4_t <var>uc</var>)</i>
2134 <a name="IDX647"></a>
2135 </dt>
2136 <dt><u>Function:</u> bool <b>uc_is_property_dash</b><i> (ucs4_t <var>uc</var>)</i>
2137 <a name="IDX648"></a>
2138 </dt>
2139 <dt><u>Function:</u> bool <b>uc_is_property_hyphen</b><i> (ucs4_t <var>uc</var>)</i>
2140 <a name="IDX649"></a>
2141 </dt>
2142 <dt><u>Function:</u> bool <b>uc_is_property_punctuation</b><i> (ucs4_t <var>uc</var>)</i>
2143 <a name="IDX650"></a>
2144 </dt>
2145 <dt><u>Function:</u> bool <b>uc_is_property_line_separator</b><i> (ucs4_t <var>uc</var>)</i>
2146 <a name="IDX651"></a>
2147 </dt>
2148 <dt><u>Function:</u> bool <b>uc_is_property_paragraph_separator</b><i> (ucs4_t <var>uc</var>)</i>
2149 <a name="IDX652"></a>
2150 </dt>
2151 <dt><u>Function:</u> bool <b>uc_is_property_quotation_mark</b><i> (ucs4_t <var>uc</var>)</i>
2152 <a name="IDX653"></a>
2153 </dt>
2154 <dt><u>Function:</u> bool <b>uc_is_property_sentence_terminal</b><i> (ucs4_t <var>uc</var>)</i>
2155 <a name="IDX654"></a>
2156 </dt>
2157 <dt><u>Function:</u> bool <b>uc_is_property_terminal_punctuation</b><i> (ucs4_t <var>uc</var>)</i>
2158 <a name="IDX655"></a>
2159 </dt>
2160 <dt><u>Function:</u> bool <b>uc_is_property_currency_symbol</b><i> (ucs4_t <var>uc</var>)</i>
2161 <a name="IDX656"></a>
2162 </dt>
2163 <dt><u>Function:</u> bool <b>uc_is_property_math</b><i> (ucs4_t <var>uc</var>)</i>
2164 <a name="IDX657"></a>
2165 </dt>
2166 <dt><u>Function:</u> bool <b>uc_is_property_other_math</b><i> (ucs4_t <var>uc</var>)</i>
2167 <a name="IDX658"></a>
2168 </dt>
2169 <dt><u>Function:</u> bool <b>uc_is_property_paired_punctuation</b><i> (ucs4_t <var>uc</var>)</i>
2170 <a name="IDX659"></a>
2171 </dt>
2172 <dt><u>Function:</u> bool <b>uc_is_property_left_of_pair</b><i> (ucs4_t <var>uc</var>)</i>
2173 <a name="IDX660"></a>
2174 </dt>
2175 <dt><u>Function:</u> bool <b>uc_is_property_combining</b><i> (ucs4_t <var>uc</var>)</i>
2176 <a name="IDX661"></a>
2177 </dt>
2178 <dt><u>Function:</u> bool <b>uc_is_property_composite</b><i> (ucs4_t <var>uc</var>)</i>
2179 <a name="IDX662"></a>
2180 </dt>
2181 <dt><u>Function:</u> bool <b>uc_is_property_decimal_digit</b><i> (ucs4_t <var>uc</var>)</i>
2182 <a name="IDX663"></a>
2183 </dt>
2184 <dt><u>Function:</u> bool <b>uc_is_property_numeric</b><i> (ucs4_t <var>uc</var>)</i>
2185 <a name="IDX664"></a>
2186 </dt>
2187 <dt><u>Function:</u> bool <b>uc_is_property_diacritic</b><i> (ucs4_t <var>uc</var>)</i>
2188 <a name="IDX665"></a>
2189 </dt>
2190 <dt><u>Function:</u> bool <b>uc_is_property_extender</b><i> (ucs4_t <var>uc</var>)</i>
2191 <a name="IDX666"></a>
2192 </dt>
2193 <dt><u>Function:</u> bool <b>uc_is_property_ignorable_control</b><i> (ucs4_t <var>uc</var>)</i>
2194 <a name="IDX667"></a>
2195 </dt>
2196 </dl>
2197
2198 <hr size="6">
2199 <a name="Scripts"></a>
2200 <a name="SEC36"></a>
2201 <h2 class="section"> <a href="libunistring.html#TOC36">8.10 Scripts</a> </h2>
2202
2203 <p>The Unicode characters are subdivided into scripts.
2204 </p>
2205 <p>The following type is used to represent a script:
2206 </p>
2207 <dl>
2208 <dt><u>Type:</u> <b>uc_script_t</b>
2209 <a name="IDX668"></a>
2210 </dt>
2211 <dd><p>This data type is a structure type that refers to statically allocated
2212 read-only data.  It contains the following fields:
2213 </p><table><tr><td>&nbsp;</td><td><pre class="smallexample">const char *name;
2214 </pre></td></tr></table>
2215
2216 <p>The <code>name</code> field contains the name of the script.
2217 </p></dd></dl>
2218
2219 <a name="IDX669"></a>
2220 <p>The following functions look up a script.
2221 </p>
2222 <dl>
2223 <dt><u>Function:</u> const uc_script_t * <b>uc_script</b><i> (ucs4_t <var>uc</var>)</i>
2224 <a name="IDX670"></a>
2225 </dt>
2226 <dd><p>Returns the script of a Unicode character.  Returns NULL if <var>uc</var> does not
2227 belong to any script.
2228 </p></dd></dl>
2229
2230 <dl>
2231 <dt><u>Function:</u> const uc_script_t * <b>uc_script_byname</b><i> (const char *<var>script_name</var>)</i>
2232 <a name="IDX671"></a>
2233 </dt>
2234 <dd><p>Returns the script given by its name, e.g. <code>&quot;HAN&quot;</code>.  Returns NULL if a
2235 script with the given name does not exist.
2236 </p></dd></dl>
2237
2238 <p>The following function views a script as a set of Unicode characters.
2239 </p>
2240 <dl>
2241 <dt><u>Function:</u> bool <b>uc_is_script</b><i> (ucs4_t <var>uc</var>, const uc_script_t *<var>script</var>)</i>
2242 <a name="IDX672"></a>
2243 </dt>
2244 <dd><p>Tests whether a Unicode character belongs to a given script.
2245 </p></dd></dl>
2246
2247 <p>The following gives a global picture of all scripts.
2248 </p>
2249 <dl>
2250 <dt><u>Function:</u> void <b>uc_all_scripts</b><i> (const uc_script_t **<var>scripts</var>, size_t *<var>count</var>)</i>
2251 <a name="IDX673"></a>
2252 </dt>
2253 <dd><p>Get the list of all scripts.  Stores a pointer to an array of all scripts in
2254 <code>*<var>scripts</var></code> and the length of this array in <code>*<var>count</var></code>.
2255 </p></dd></dl>
2256
2257 <hr size="6">
2258 <a name="Blocks"></a>
2259 <a name="SEC37"></a>
2260 <h2 class="section"> <a href="libunistring.html#TOC37">8.11 Blocks</a> </h2>
2261
2262 <p>The Unicode characters are subdivided into blocks.  A block is an interval of
2263 Unicode code points.
2264 </p>
2265 <p>The following type is used to represent a block.
2266 </p>
2267 <dl>
2268 <dt><u>Type:</u> <b>uc_block_t</b>
2269 <a name="IDX674"></a>
2270 </dt>
2271 <dd><p>This data type is a structure type that refers to statically allocated data.
2272 It contains the following fields:
2273 </p><table><tr><td>&nbsp;</td><td><pre class="smallexample">ucs4_t start;
2274 ucs4_t end;
2275 const char *name;
2276 </pre></td></tr></table>
2277
2278 <p>The <code>start</code> field is the first Unicode code point in the block.
2279 </p>
2280 <p>The <code>end</code> field is the last Unicode code point in the block.
2281 </p>
2282 <p>The <code>name</code> field is the name of the block.
2283 </p></dd></dl>
2284
2285 <a name="IDX675"></a>
2286 <p>The following function looks up a block.
2287 </p>
2288 <dl>
2289 <dt><u>Function:</u> const uc_block_t * <b>uc_block</b><i> (ucs4_t <var>uc</var>)</i>
2290 <a name="IDX676"></a>
2291 </dt>
2292 <dd><p>Returns the block a character belongs to.
2293 </p></dd></dl>
2294
2295 <p>The following function views a block as a set of Unicode characters.
2296 </p>
2297 <dl>
2298 <dt><u>Function:</u> bool <b>uc_is_block</b><i> (ucs4_t <var>uc</var>, const uc_block_t *<var>block</var>)</i>
2299 <a name="IDX677"></a>
2300 </dt>
2301 <dd><p>Tests whether a Unicode character belongs to a given block.
2302 </p></dd></dl>
2303
2304 <p>The following gives a global picture of all block.
2305 </p>
2306 <dl>
2307 <dt><u>Function:</u> void <b>uc_all_blocks</b><i> (const uc_block_t **<var>blocks</var>, size_t *<var>count</var>)</i>
2308 <a name="IDX678"></a>
2309 </dt>
2310 <dd><p>Get the list of all blocks.  Stores a pointer to an array of all blocks in
2311 <code>*<var>blocks</var></code> and the length of this array in <code>*<var>count</var></code>.
2312 </p></dd></dl>
2313
2314 <hr size="6">
2315 <a name="ISO-C-and-Java-syntax"></a>
2316 <a name="SEC38"></a>
2317 <h2 class="section"> <a href="libunistring.html#TOC38">8.12 ISO C and Java syntax</a> </h2>
2318
2319 <p>The following properties are taken from language standards.  The supported
2320 language standards are ISO C 99 and Java.
2321 </p>
2322 <dl>
2323 <dt><u>Function:</u> bool <b>uc_is_c_whitespace</b><i> (ucs4_t <var>uc</var>)</i>
2324 <a name="IDX679"></a>
2325 </dt>
2326 <dd><p>Tests whether a Unicode character is considered whitespace in ISO C 99.
2327 </p></dd></dl>
2328
2329 <dl>
2330 <dt><u>Function:</u> bool <b>uc_is_java_whitespace</b><i> (ucs4_t <var>uc</var>)</i>
2331 <a name="IDX680"></a>
2332 </dt>
2333 <dd><p>Tests whether a Unicode character is considered whitespace in Java.
2334 </p></dd></dl>
2335
2336 <p>The following enumerated values are the possible return values of the functions
2337 <code>uc_c_ident_category</code> and <code>uc_java_ident_category</code>.
2338 </p>
2339 <dl>
2340 <dt><u>Constant:</u> int <b>UC_IDENTIFIER_START</b>
2341 <a name="IDX681"></a>
2342 </dt>
2343 <dd><p>This return value means that the given character is valid as first or
2344 subsequent character in an identifier.
2345 </p></dd></dl>
2346
2347 <dl>
2348 <dt><u>Constant:</u> int <b>UC_IDENTIFIER_VALID</b>
2349 <a name="IDX682"></a>
2350 </dt>
2351 <dd><p>This return value means that the given character is valid as subsequent
2352 character only.
2353 </p></dd></dl>
2354
2355 <dl>
2356 <dt><u>Constant:</u> int <b>UC_IDENTIFIER_INVALID</b>
2357 <a name="IDX683"></a>
2358 </dt>
2359 <dd><p>This return value means that the given character is not valid in an identifier.
2360 </p></dd></dl>
2361
2362 <dl>
2363 <dt><u>Constant:</u> int <b>UC_IDENTIFIER_IGNORABLE</b>
2364 <a name="IDX684"></a>
2365 </dt>
2366 <dd><p>This return value (only for Java) means that the given character is ignorable.
2367 </p></dd></dl>
2368
2369 <p>The following function determine whether a given character can be a constituent
2370 of an identifier in the given programming language.
2371 </p>
2372 <a name="IDX685"></a>
2373 <dl>
2374 <dt><u>Function:</u> int <b>uc_c_ident_category</b><i> (ucs4_t <var>uc</var>)</i>
2375 <a name="IDX686"></a>
2376 </dt>
2377 <dd><p>Returns the categorization of a Unicode character with respect to the ISO C 99
2378 identifier syntax.
2379 </p></dd></dl>
2380
2381 <a name="IDX687"></a>
2382 <dl>
2383 <dt><u>Function:</u> int <b>uc_java_ident_category</b><i> (ucs4_t <var>uc</var>)</i>
2384 <a name="IDX688"></a>
2385 </dt>
2386 <dd><p>Returns the categorization of a Unicode character with respect to the Java
2387 identifier syntax.
2388 </p></dd></dl>
2389
2390 <hr size="6">
2391 <a name="Classifications-like-in-ISO-C"></a>
2392 <a name="SEC39"></a>
2393 <h2 class="section"> <a href="libunistring.html#TOC39">8.13 Classifications like in ISO C</a> </h2>
2394
2395 <p>The following character classifications mimic those declared in the ISO C
2396 header files <code>&lt;ctype.h&gt;</code> and <code>&lt;wctype.h&gt;</code>.  These functions are
2397 deprecated, because this set of functions was designed with ASCII in mind and
2398 cannot reflect the more diverse reality of the Unicode character set.  But
2399 they can be a quick-and-dirty porting aid when migrating from <code>wchar_t</code>
2400 APIs to Unicode strings.
2401 </p>
2402 <dl>
2403 <dt><u>Function:</u> bool <b>uc_is_alnum</b><i> (ucs4_t <var>uc</var>)</i>
2404 <a name="IDX689"></a>
2405 </dt>
2406 <dd><p>Tests for any character for which <code>uc_is_alpha</code> or <code>uc_is_digit</code> is
2407 true.
2408 </p></dd></dl>
2409
2410 <dl>
2411 <dt><u>Function:</u> bool <b>uc_is_alpha</b><i> (ucs4_t <var>uc</var>)</i>
2412 <a name="IDX690"></a>
2413 </dt>
2414 <dd><p>Tests for any character for which <code>uc_is_upper</code> or <code>uc_is_lower</code> is
2415 true, or any character that is one of a locale-specific set of characters for
2416 which none of <code>uc_is_cntrl</code>, <code>uc_is_digit</code>, <code>uc_is_punct</code>, or
2417 <code>uc_is_space</code> is true.
2418 </p></dd></dl>
2419
2420 <dl>
2421 <dt><u>Function:</u> bool <b>uc_is_cntrl</b><i> (ucs4_t <var>uc</var>)</i>
2422 <a name="IDX691"></a>
2423 </dt>
2424 <dd><p>Tests for any control character.
2425 </p></dd></dl>
2426
2427 <dl>
2428 <dt><u>Function:</u> bool <b>uc_is_digit</b><i> (ucs4_t <var>uc</var>)</i>
2429 <a name="IDX692"></a>
2430 </dt>
2431 <dd><p>Tests for any character that corresponds to a decimal-digit character.
2432 </p></dd></dl>
2433
2434 <dl>
2435 <dt><u>Function:</u> bool <b>uc_is_graph</b><i> (ucs4_t <var>uc</var>)</i>
2436 <a name="IDX693"></a>
2437 </dt>
2438 <dd><p>Tests for any character for which <code>uc_is_print</code> is true and
2439 <code>uc_is_space</code> is false.
2440 </p></dd></dl>
2441
2442 <dl>
2443 <dt><u>Function:</u> bool <b>uc_is_lower</b><i> (ucs4_t <var>uc</var>)</i>
2444 <a name="IDX694"></a>
2445 </dt>
2446 <dd><p>Tests for any character that corresponds to a lowercase letter or is one
2447 of a locale-specific set of characters for which none of <code>uc_is_cntrl</code>,
2448 <code>uc_is_digit</code>, <code>uc_is_punct</code>, or <code>uc_is_space</code> is true.
2449 </p></dd></dl>
2450
2451 <dl>
2452 <dt><u>Function:</u> bool <b>uc_is_print</b><i> (ucs4_t <var>uc</var>)</i>
2453 <a name="IDX695"></a>
2454 </dt>
2455 <dd><p>Tests for any printing character.
2456 </p></dd></dl>
2457
2458 <dl>
2459 <dt><u>Function:</u> bool <b>uc_is_punct</b><i> (ucs4_t <var>uc</var>)</i>
2460 <a name="IDX696"></a>
2461 </dt>
2462 <dd><p>Tests for any printing character that is one of a locale-specific set of
2463 characters for which neither <code>uc_is_space</code> nor <code>uc_is_alnum</code> is true.
2464 </p></dd></dl>
2465
2466 <dl>
2467 <dt><u>Function:</u> bool <b>uc_is_space</b><i> (ucs4_t <var>uc</var>)</i>
2468 <a name="IDX697"></a>
2469 </dt>
2470 <dd><p>Test for any character that corresponds to a locale-specific set of characters
2471 for which none of <code>uc_is_alnum</code>, <code>uc_is_graph</code>, or <code>uc_is_punct</code>
2472 is true.
2473 </p></dd></dl>
2474
2475 <dl>
2476 <dt><u>Function:</u> bool <b>uc_is_upper</b><i> (ucs4_t <var>uc</var>)</i>
2477 <a name="IDX698"></a>
2478 </dt>
2479 <dd><p>Tests for any character that corresponds to an uppercase letter or is one
2480 of a locale-specific set of characters for which none of <code>uc_is_cntrl</code>,
2481 <code>uc_is_digit</code>, <code>uc_is_punct</code>, or <code>uc_is_space</code> is true.
2482 </p></dd></dl>
2483
2484 <dl>
2485 <dt><u>Function:</u> bool <b>uc_is_xdigit</b><i> (ucs4_t <var>uc</var>)</i>
2486 <a name="IDX699"></a>
2487 </dt>
2488 <dd><p>Tests for any character that corresponds to a hexadecimal-digit character.
2489 </p></dd></dl>
2490
2491 <dl>
2492 <dt><u>Function:</u> bool <b>uc_is_blank</b><i> (ucs4_t <var>uc</var>)</i>
2493 <a name="IDX700"></a>
2494 </dt>
2495 <dd><p>Tests for any character that corresponds to a standard blank character or
2496 a locale-specific set of characters for which <code>uc_is_alnum</code> is false.
2497 </p></dd></dl>
2498 <hr size="6">
2499 <table cellpadding="1" cellspacing="1" border="0">
2500 <tr><td valign="middle" align="left">[<a href="#SEC20" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
2501 <td valign="middle" align="left">[<a href="libunistring_9.html#SEC40" title="Next chapter"> &gt;&gt; </a>]</td>
2502 <td valign="middle" align="left"> &nbsp; </td>
2503 <td valign="middle" align="left"> &nbsp; </td>
2504 <td valign="middle" align="left"> &nbsp; </td>
2505 <td valign="middle" align="left"> &nbsp; </td>
2506 <td valign="middle" align="left"> &nbsp; </td>
2507 <td valign="middle" align="left">[<a href="libunistring.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
2508 <td valign="middle" align="left">[<a href="libunistring.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
2509 <td valign="middle" align="left">[<a href="libunistring_19.html#SEC77" title="Index">Index</a>]</td>
2510 <td valign="middle" align="left">[<a href="libunistring_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
2511 </tr></table>
2512 <p>
2513  <font size="-1">
2514   This document was generated by <em>Daiki Ueno</em> on <em>September, 1 2014</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.78a</em></a>.
2515  </font>
2516  <br>
2517
2518 </p>
2519 </body>
2520 </html>