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