1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
3 <!-- Created on October, 16 2022 by texi2html 1.78a -->
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>
9 Maintained by: Many creative people.
10 Send bugs and suggestions to <texi2html-bug@nongnu.org>
14 <title>GNU libunistring: 8. Unicode character classification and properties <unictype.h></title>
16 <meta name="description" content="GNU libunistring: 8. Unicode character classification and properties <unictype.h>">
17 <meta name="keywords" content="GNU libunistring: 8. Unicode character classification and properties <unictype.h>">
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">
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}
42 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
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"> << </a>]</td>
46 <td valign="middle" align="left">[<a href="libunistring_9.html#SEC53" title="Next chapter"> >> </a>]</td>
47 <td valign="middle" align="left"> </td>
48 <td valign="middle" align="left"> </td>
49 <td valign="middle" align="left"> </td>
50 <td valign="middle" align="left"> </td>
51 <td valign="middle" align="left"> </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>
59 <a name="unictype_002eh"></a>
61 <h1 class="chapter"> <a href="libunistring_toc.html#TOC33">8. Unicode character classification and properties <code><unictype.h></code></a> </h1>
63 <p>This include file declares functions that classify Unicode characters
64 and that test whether Unicode characters have specific properties.
66 <p>The classification assigns a “general category” to every Unicode
67 character. This is similar to the classification provided by ISO C in
68 <code><wctype.h></code>.
70 <p>Properties are the data that guides various text processing algorithms
71 in the presence of specific Unicode characters.
75 <a name="General-category"></a>
77 <h2 class="section"> <a href="libunistring_toc.html#TOC34">8.1 General category</a> </h2>
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
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.
96 <a name="Object-oriented-API"></a>
98 <h3 class="subsection"> <a href="libunistring_toc.html#TOC35">8.1.1 The object oriented API for general category</a> </h3>
101 <dt><u>Type:</u> <b>uc_general_category_t</b>
102 <a name="IDX233"></a>
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
109 <p>The following are the predefined general category value. Additional general
110 categories may be added in the future.
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.
117 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_L</b>
118 <a name="IDX234"></a>
120 <dt><u>Macro:</u> uc_general_category_t <b>UC_LETTER</b>
121 <a name="IDX235"></a>
123 <dd><p>This represents the general category “Letter”.
127 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_LC</b>
128 <a name="IDX236"></a>
130 <dt><u>Macro:</u> uc_general_category_t <b>UC_CASED_LETTER</b>
131 <a name="IDX237"></a>
136 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Lu</b>
137 <a name="IDX238"></a>
139 <dt><u>Macro:</u> uc_general_category_t <b>UC_UPPERCASE_LETTER</b>
140 <a name="IDX239"></a>
142 <dd><p>This represents the general category “Letter, uppercase”.
146 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Ll</b>
147 <a name="IDX240"></a>
149 <dt><u>Macro:</u> uc_general_category_t <b>UC_LOWERCASE_LETTER</b>
150 <a name="IDX241"></a>
152 <dd><p>This represents the general category “Letter, lowercase”.
156 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Lt</b>
157 <a name="IDX242"></a>
159 <dt><u>Macro:</u> uc_general_category_t <b>UC_TITLECASE_LETTER</b>
160 <a name="IDX243"></a>
162 <dd><p>This represents the general category “Letter, titlecase”.
166 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Lm</b>
167 <a name="IDX244"></a>
169 <dt><u>Macro:</u> uc_general_category_t <b>UC_MODIFIER_LETTER</b>
170 <a name="IDX245"></a>
172 <dd><p>This represents the general category “Letter, modifier”.
176 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Lo</b>
177 <a name="IDX246"></a>
179 <dt><u>Macro:</u> uc_general_category_t <b>UC_OTHER_LETTER</b>
180 <a name="IDX247"></a>
182 <dd><p>This represents the general category “Letter, other”.
186 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_M</b>
187 <a name="IDX248"></a>
189 <dt><u>Macro:</u> uc_general_category_t <b>UC_MARK</b>
190 <a name="IDX249"></a>
192 <dd><p>This represents the general category “Marker”.
196 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Mn</b>
197 <a name="IDX250"></a>
199 <dt><u>Macro:</u> uc_general_category_t <b>UC_NON_SPACING_MARK</b>
200 <a name="IDX251"></a>
202 <dd><p>This represents the general category “Marker, nonspacing”.
206 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Mc</b>
207 <a name="IDX252"></a>
209 <dt><u>Macro:</u> uc_general_category_t <b>UC_COMBINING_SPACING_MARK</b>
210 <a name="IDX253"></a>
212 <dd><p>This represents the general category “Marker, spacing combining”.
216 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Me</b>
217 <a name="IDX254"></a>
219 <dt><u>Macro:</u> uc_general_category_t <b>UC_ENCLOSING_MARK</b>
220 <a name="IDX255"></a>
222 <dd><p>This represents the general category “Marker, enclosing”.
226 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_N</b>
227 <a name="IDX256"></a>
229 <dt><u>Macro:</u> uc_general_category_t <b>UC_NUMBER</b>
230 <a name="IDX257"></a>
232 <dd><p>This represents the general category “Number”.
236 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Nd</b>
237 <a name="IDX258"></a>
239 <dt><u>Macro:</u> uc_general_category_t <b>UC_DECIMAL_DIGIT_NUMBER</b>
240 <a name="IDX259"></a>
242 <dd><p>This represents the general category “Number, decimal digit”.
246 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Nl</b>
247 <a name="IDX260"></a>
249 <dt><u>Macro:</u> uc_general_category_t <b>UC_LETTER_NUMBER</b>
250 <a name="IDX261"></a>
252 <dd><p>This represents the general category “Number, letter”.
256 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_No</b>
257 <a name="IDX262"></a>
259 <dt><u>Macro:</u> uc_general_category_t <b>UC_OTHER_NUMBER</b>
260 <a name="IDX263"></a>
262 <dd><p>This represents the general category “Number, other”.
266 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_P</b>
267 <a name="IDX264"></a>
269 <dt><u>Macro:</u> uc_general_category_t <b>UC_PUNCTUATION</b>
270 <a name="IDX265"></a>
272 <dd><p>This represents the general category “Punctuation”.
276 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Pc</b>
277 <a name="IDX266"></a>
279 <dt><u>Macro:</u> uc_general_category_t <b>UC_CONNECTOR_PUNCTUATION</b>
280 <a name="IDX267"></a>
282 <dd><p>This represents the general category “Punctuation, connector”.
286 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Pd</b>
287 <a name="IDX268"></a>
289 <dt><u>Macro:</u> uc_general_category_t <b>UC_DASH_PUNCTUATION</b>
290 <a name="IDX269"></a>
292 <dd><p>This represents the general category “Punctuation, dash”.
296 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Ps</b>
297 <a name="IDX270"></a>
299 <dt><u>Macro:</u> uc_general_category_t <b>UC_OPEN_PUNCTUATION</b>
300 <a name="IDX271"></a>
302 <dd><p>This represents the general category “Punctuation, open”, a.k.a. “start punctuation”.
306 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Pe</b>
307 <a name="IDX272"></a>
309 <dt><u>Macro:</u> uc_general_category_t <b>UC_CLOSE_PUNCTUATION</b>
310 <a name="IDX273"></a>
312 <dd><p>This represents the general category “Punctuation, close”, a.k.a. “end punctuation”.
316 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Pi</b>
317 <a name="IDX274"></a>
319 <dt><u>Macro:</u> uc_general_category_t <b>UC_INITIAL_QUOTE_PUNCTUATION</b>
320 <a name="IDX275"></a>
322 <dd><p>This represents the general category “Punctuation, initial quote”.
326 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Pf</b>
327 <a name="IDX276"></a>
329 <dt><u>Macro:</u> uc_general_category_t <b>UC_FINAL_QUOTE_PUNCTUATION</b>
330 <a name="IDX277"></a>
332 <dd><p>This represents the general category “Punctuation, final quote”.
336 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Po</b>
337 <a name="IDX278"></a>
339 <dt><u>Macro:</u> uc_general_category_t <b>UC_OTHER_PUNCTUATION</b>
340 <a name="IDX279"></a>
342 <dd><p>This represents the general category “Punctuation, other”.
346 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_S</b>
347 <a name="IDX280"></a>
349 <dt><u>Macro:</u> uc_general_category_t <b>UC_SYMBOL</b>
350 <a name="IDX281"></a>
352 <dd><p>This represents the general category “Symbol”.
356 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Sm</b>
357 <a name="IDX282"></a>
359 <dt><u>Macro:</u> uc_general_category_t <b>UC_MATH_SYMBOL</b>
360 <a name="IDX283"></a>
362 <dd><p>This represents the general category “Symbol, math”.
366 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Sc</b>
367 <a name="IDX284"></a>
369 <dt><u>Macro:</u> uc_general_category_t <b>UC_CURRENCY_SYMBOL</b>
370 <a name="IDX285"></a>
372 <dd><p>This represents the general category “Symbol, currency”.
376 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Sk</b>
377 <a name="IDX286"></a>
379 <dt><u>Macro:</u> uc_general_category_t <b>UC_MODIFIER_SYMBOL</b>
380 <a name="IDX287"></a>
382 <dd><p>This represents the general category “Symbol, modifier”.
386 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_So</b>
387 <a name="IDX288"></a>
389 <dt><u>Macro:</u> uc_general_category_t <b>UC_OTHER_SYMBOL</b>
390 <a name="IDX289"></a>
392 <dd><p>This represents the general category “Symbol, other”.
396 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Z</b>
397 <a name="IDX290"></a>
399 <dt><u>Macro:</u> uc_general_category_t <b>UC_SEPARATOR</b>
400 <a name="IDX291"></a>
402 <dd><p>This represents the general category “Separator”.
406 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Zs</b>
407 <a name="IDX292"></a>
409 <dt><u>Macro:</u> uc_general_category_t <b>UC_SPACE_SEPARATOR</b>
410 <a name="IDX293"></a>
412 <dd><p>This represents the general category “Separator, space”.
416 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Zl</b>
417 <a name="IDX294"></a>
419 <dt><u>Macro:</u> uc_general_category_t <b>UC_LINE_SEPARATOR</b>
420 <a name="IDX295"></a>
422 <dd><p>This represents the general category “Separator, line”.
426 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Zp</b>
427 <a name="IDX296"></a>
429 <dt><u>Macro:</u> uc_general_category_t <b>UC_PARAGRAPH_SEPARATOR</b>
430 <a name="IDX297"></a>
432 <dd><p>This represents the general category “Separator, paragraph”.
436 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_C</b>
437 <a name="IDX298"></a>
439 <dt><u>Macro:</u> uc_general_category_t <b>UC_OTHER</b>
440 <a name="IDX299"></a>
442 <dd><p>This represents the general category “Other”.
446 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Cc</b>
447 <a name="IDX300"></a>
449 <dt><u>Macro:</u> uc_general_category_t <b>UC_CONTROL</b>
450 <a name="IDX301"></a>
452 <dd><p>This represents the general category “Other, control”.
456 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Cf</b>
457 <a name="IDX302"></a>
459 <dt><u>Macro:</u> uc_general_category_t <b>UC_FORMAT</b>
460 <a name="IDX303"></a>
462 <dd><p>This represents the general category “Other, format”.
466 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Cs</b>
467 <a name="IDX304"></a>
469 <dt><u>Macro:</u> uc_general_category_t <b>UC_SURROGATE</b>
470 <a name="IDX305"></a>
472 <dd><p>This represents the general category “Other, surrogate”.
473 All code points in this category are invalid characters.
477 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Co</b>
478 <a name="IDX306"></a>
480 <dt><u>Macro:</u> uc_general_category_t <b>UC_PRIVATE_USE</b>
481 <a name="IDX307"></a>
483 <dd><p>This represents the general category “Other, private use”.
487 <dt><u>Constant:</u> uc_general_category_t <b>UC_CATEGORY_Cn</b>
488 <a name="IDX308"></a>
490 <dt><u>Macro:</u> uc_general_category_t <b>UC_UNASSIGNED</b>
491 <a name="IDX309"></a>
493 <dd><p>This represents the general category “Other, not assigned”.
494 Some code points in this category are invalid characters.
497 <p>The following functions combine general categories, like in a boolean algebra,
498 except that there is no ‘<samp>not</samp>’ operation.
501 <dt><u>Function:</u> uc_general_category_t <b>uc_general_category_or</b><i> (uc_general_category_t <var>category1</var>, uc_general_category_t <var>category2</var>)</i>
502 <a name="IDX310"></a>
504 <dd><p>Returns the union of two general categories.
505 This corresponds to the unions of the two sets of characters.
509 <dt><u>Function:</u> uc_general_category_t <b>uc_general_category_and</b><i> (uc_general_category_t <var>category1</var>, uc_general_category_t <var>category2</var>)</i>
510 <a name="IDX311"></a>
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
518 <dt><u>Function:</u> uc_general_category_t <b>uc_general_category_and_not</b><i> (uc_general_category_t <var>category1</var>, uc_general_category_t <var>category2</var>)</i>
519 <a name="IDX312"></a>
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.
527 <p>The following functions associate general categories with their name.
530 <dt><u>Function:</u> const char * <b>uc_general_category_name</b><i> (uc_general_category_t <var>category</var>)</i>
531 <a name="IDX313"></a>
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
539 <dt><u>Function:</u> const char * <b>uc_general_category_long_name</b><i> (uc_general_category_t <var>category</var>)</i>
540 <a name="IDX314"></a>
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
548 <dt><u>Function:</u> uc_general_category_t <b>uc_general_category_byname</b><i> (const char *<var>category_name</var>)</i>
549 <a name="IDX315"></a>
551 <dd><p>Returns the general category given by name, e.g. <code>"Lu"</code>, or by long
552 name, e.g. <code>"Uppercase Letter"</code>.
553 This lookup ignores spaces, underscores, or hyphens as word separators and is
557 <p>The following functions view general categories as sets of Unicode characters.
560 <dt><u>Function:</u> uc_general_category_t <b>uc_general_category</b><i> (ucs4_t <var>uc</var>)</i>
561 <a name="IDX316"></a>
563 <dd><p>Returns the general category of a Unicode character.
565 <p>This function uses a big table.
569 <dt><u>Function:</u> bool <b>uc_is_general_category</b><i> (ucs4_t <var>uc</var>, uc_general_category_t <var>category</var>)</i>
570 <a name="IDX317"></a>
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.
578 <a name="Bit-mask-API"></a>
580 <h3 class="subsection"> <a href="libunistring_toc.html#TOC36">8.1.2 The bit mask API for general category</a> </h3>
582 <p>The following are the predefined general category value as bit masks.
583 Additional general categories may be added in the future.
586 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_L</b>
587 <a name="IDX318"></a>
589 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_LC</b>
590 <a name="IDX319"></a>
592 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Lu</b>
593 <a name="IDX320"></a>
595 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Ll</b>
596 <a name="IDX321"></a>
598 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Lt</b>
599 <a name="IDX322"></a>
601 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Lm</b>
602 <a name="IDX323"></a>
604 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Lo</b>
605 <a name="IDX324"></a>
607 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_M</b>
608 <a name="IDX325"></a>
610 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Mn</b>
611 <a name="IDX326"></a>
613 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Mc</b>
614 <a name="IDX327"></a>
616 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Me</b>
617 <a name="IDX328"></a>
619 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_N</b>
620 <a name="IDX329"></a>
622 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Nd</b>
623 <a name="IDX330"></a>
625 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Nl</b>
626 <a name="IDX331"></a>
628 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_No</b>
629 <a name="IDX332"></a>
631 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_P</b>
632 <a name="IDX333"></a>
634 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Pc</b>
635 <a name="IDX334"></a>
637 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Pd</b>
638 <a name="IDX335"></a>
640 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Ps</b>
641 <a name="IDX336"></a>
643 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Pe</b>
644 <a name="IDX337"></a>
646 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Pi</b>
647 <a name="IDX338"></a>
649 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Pf</b>
650 <a name="IDX339"></a>
652 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Po</b>
653 <a name="IDX340"></a>
655 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_S</b>
656 <a name="IDX341"></a>
658 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Sm</b>
659 <a name="IDX342"></a>
661 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Sc</b>
662 <a name="IDX343"></a>
664 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Sk</b>
665 <a name="IDX344"></a>
667 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_So</b>
668 <a name="IDX345"></a>
670 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Z</b>
671 <a name="IDX346"></a>
673 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Zs</b>
674 <a name="IDX347"></a>
676 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Zl</b>
677 <a name="IDX348"></a>
679 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Zp</b>
680 <a name="IDX349"></a>
682 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_C</b>
683 <a name="IDX350"></a>
685 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Cc</b>
686 <a name="IDX351"></a>
688 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Cf</b>
689 <a name="IDX352"></a>
691 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Cs</b>
692 <a name="IDX353"></a>
694 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Co</b>
695 <a name="IDX354"></a>
697 <dt><u>Macro:</u> uint32_t <b>UC_CATEGORY_MASK_Cn</b>
698 <a name="IDX355"></a>
702 <p>The following function views general categories as sets of Unicode characters.
705 <dt><u>Function:</u> bool <b>uc_is_general_category_withtable</b><i> (ucs4_t <var>uc</var>, uint32_t <var>bitmask</var>)</i>
706 <a name="IDX356"></a>
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.
712 <p>This function uses a big table comprising all general categories.
716 <a name="Canonical-combining-class"></a>
718 <h2 class="section"> <a href="libunistring_toc.html#TOC37">8.2 Canonical combining class</a> </h2>
720 <p>Every Unicode character or code point has a <em>canonical combining class</em>
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 "first" or "closer" to the base character.
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.
737 <dt><u>Constant:</u> int <b>UC_CCC_NR</b>
738 <a name="IDX357"></a>
740 <dd><p>The canonical combining class value for “Not Reordered” characters.
745 <dt><u>Constant:</u> int <b>UC_CCC_OV</b>
746 <a name="IDX358"></a>
748 <dd><p>The canonical combining class value for “Overlay” characters.
752 <dt><u>Constant:</u> int <b>UC_CCC_NK</b>
753 <a name="IDX359"></a>
755 <dd><p>The canonical combining class value for “Nukta” characters.
759 <dt><u>Constant:</u> int <b>UC_CCC_KV</b>
760 <a name="IDX360"></a>
762 <dd><p>The canonical combining class value for “Kana Voicing” characters.
766 <dt><u>Constant:</u> int <b>UC_CCC_VR</b>
767 <a name="IDX361"></a>
769 <dd><p>The canonical combining class value for “Virama” characters.
773 <dt><u>Constant:</u> int <b>UC_CCC_ATBL</b>
774 <a name="IDX362"></a>
776 <dd><p>The canonical combining class value for “Attached Below Left” characters.
780 <dt><u>Constant:</u> int <b>UC_CCC_ATB</b>
781 <a name="IDX363"></a>
783 <dd><p>The canonical combining class value for “Attached Below” characters.
787 <dt><u>Constant:</u> int <b>UC_CCC_ATA</b>
788 <a name="IDX364"></a>
790 <dd><p>The canonical combining class value for “Attached Above” characters.
794 <dt><u>Constant:</u> int <b>UC_CCC_ATAR</b>
795 <a name="IDX365"></a>
797 <dd><p>The canonical combining class value for “Attached Above Right” characters.
801 <dt><u>Constant:</u> int <b>UC_CCC_BL</b>
802 <a name="IDX366"></a>
804 <dd><p>The canonical combining class value for “Below Left” characters.
808 <dt><u>Constant:</u> int <b>UC_CCC_B</b>
809 <a name="IDX367"></a>
811 <dd><p>The canonical combining class value for “Below” characters.
815 <dt><u>Constant:</u> int <b>UC_CCC_BR</b>
816 <a name="IDX368"></a>
818 <dd><p>The canonical combining class value for “Below Right” characters.
822 <dt><u>Constant:</u> int <b>UC_CCC_L</b>
823 <a name="IDX369"></a>
825 <dd><p>The canonical combining class value for “Left” characters.
829 <dt><u>Constant:</u> int <b>UC_CCC_R</b>
830 <a name="IDX370"></a>
832 <dd><p>The canonical combining class value for “Right” characters.
836 <dt><u>Constant:</u> int <b>UC_CCC_AL</b>
837 <a name="IDX371"></a>
839 <dd><p>The canonical combining class value for “Above Left” characters.
843 <dt><u>Constant:</u> int <b>UC_CCC_A</b>
844 <a name="IDX372"></a>
846 <dd><p>The canonical combining class value for “Above” characters.
850 <dt><u>Constant:</u> int <b>UC_CCC_AR</b>
851 <a name="IDX373"></a>
853 <dd><p>The canonical combining class value for “Above Right” characters.
857 <dt><u>Constant:</u> int <b>UC_CCC_DB</b>
858 <a name="IDX374"></a>
860 <dd><p>The canonical combining class value for “Double Below” characters.
864 <dt><u>Constant:</u> int <b>UC_CCC_DA</b>
865 <a name="IDX375"></a>
867 <dd><p>The canonical combining class value for “Double Above” characters.
871 <dt><u>Constant:</u> int <b>UC_CCC_IS</b>
872 <a name="IDX376"></a>
874 <dd><p>The canonical combining class value for “Iota Subscript” characters.
877 <p>The following functions associate canonical combining classes with their name.
880 <dt><u>Function:</u> const char * <b>uc_combining_class_name</b><i> (int <var>ccc</var>)</i>
881 <a name="IDX377"></a>
883 <dd><p>Returns the name of a canonical combining class, more precisely, the
885 Returns NULL if the canonical combining class is a numeric value without a
890 <dt><u>Function:</u> const char * <b>uc_combining_class_long_name</b><i> (int <var>ccc</var>)</i>
891 <a name="IDX378"></a>
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
899 <dt><u>Function:</u> int <b>uc_combining_class_byname</b><i> (const char *<var>ccc_name</var>)</i>
900 <a name="IDX379"></a>
902 <dd><p>Returns the canonical combining class given by name, e.g. <code>"BL"</code>, or by
903 long name, e.g. <code>"Below Left"</code>.
904 This lookup ignores spaces, underscores, or hyphens as word separators and is
908 <p>The following function looks up the canonical combining class of a character.
911 <dt><u>Function:</u> int <b>uc_combining_class</b><i> (ucs4_t <var>uc</var>)</i>
912 <a name="IDX380"></a>
914 <dd><p>Returns the canonical combining class of a Unicode character.
918 <a name="Bidi-class"></a>
920 <h2 class="section"> <a href="libunistring_toc.html#TOC38">8.3 Bidi class</a> </h2>
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>.
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
930 <dt><u>Constant:</u> int <b>UC_BIDI_L</b>
931 <a name="IDX381"></a>
933 <dd><p>The bidi class for `Left-to-Right`” characters.
937 <dt><u>Constant:</u> int <b>UC_BIDI_LRE</b>
938 <a name="IDX382"></a>
940 <dd><p>The bidi class for “Left-to-Right Embedding” characters.
944 <dt><u>Constant:</u> int <b>UC_BIDI_LRO</b>
945 <a name="IDX383"></a>
947 <dd><p>The bidi class for “Left-to-Right Override” characters.
951 <dt><u>Constant:</u> int <b>UC_BIDI_R</b>
952 <a name="IDX384"></a>
954 <dd><p>The bidi class for “Right-to-Left” characters.
958 <dt><u>Constant:</u> int <b>UC_BIDI_AL</b>
959 <a name="IDX385"></a>
961 <dd><p>The bidi class for “Right-to-Left Arabic” characters.
965 <dt><u>Constant:</u> int <b>UC_BIDI_RLE</b>
966 <a name="IDX386"></a>
968 <dd><p>The bidi class for “Right-to-Left Embedding” characters.
972 <dt><u>Constant:</u> int <b>UC_BIDI_RLO</b>
973 <a name="IDX387"></a>
975 <dd><p>The bidi class for “Right-to-Left Override” characters.
979 <dt><u>Constant:</u> int <b>UC_BIDI_PDF</b>
980 <a name="IDX388"></a>
982 <dd><p>The bidi class for “Pop Directional Format” characters.
986 <dt><u>Constant:</u> int <b>UC_BIDI_EN</b>
987 <a name="IDX389"></a>
989 <dd><p>The bidi class for “European Number” characters.
993 <dt><u>Constant:</u> int <b>UC_BIDI_ES</b>
994 <a name="IDX390"></a>
996 <dd><p>The bidi class for “European Number Separator” characters.
1000 <dt><u>Constant:</u> int <b>UC_BIDI_ET</b>
1001 <a name="IDX391"></a>
1003 <dd><p>The bidi class for “European Number Terminator” characters.
1007 <dt><u>Constant:</u> int <b>UC_BIDI_AN</b>
1008 <a name="IDX392"></a>
1010 <dd><p>The bidi class for “Arabic Number” characters.
1014 <dt><u>Constant:</u> int <b>UC_BIDI_CS</b>
1015 <a name="IDX393"></a>
1017 <dd><p>The bidi class for “Common Number Separator” characters.
1021 <dt><u>Constant:</u> int <b>UC_BIDI_NSM</b>
1022 <a name="IDX394"></a>
1024 <dd><p>The bidi class for “Non-Spacing Mark” characters.
1028 <dt><u>Constant:</u> int <b>UC_BIDI_BN</b>
1029 <a name="IDX395"></a>
1031 <dd><p>The bidi class for “Boundary Neutral” characters.
1035 <dt><u>Constant:</u> int <b>UC_BIDI_B</b>
1036 <a name="IDX396"></a>
1038 <dd><p>The bidi class for “Paragraph Separator” characters.
1042 <dt><u>Constant:</u> int <b>UC_BIDI_S</b>
1043 <a name="IDX397"></a>
1045 <dd><p>The bidi class for “Segment Separator” characters.
1049 <dt><u>Constant:</u> int <b>UC_BIDI_WS</b>
1050 <a name="IDX398"></a>
1052 <dd><p>The bidi class for “Whitespace” characters.
1056 <dt><u>Constant:</u> int <b>UC_BIDI_ON</b>
1057 <a name="IDX399"></a>
1059 <dd><p>The bidi class for “Other Neutral” characters.
1063 <dt><u>Constant:</u> int <b>UC_BIDI_LRI</b>
1064 <a name="IDX400"></a>
1066 <dd><p>The bidi class for “Left-to-Right Isolate” characters.
1070 <dt><u>Constant:</u> int <b>UC_BIDI_RLI</b>
1071 <a name="IDX401"></a>
1073 <dd><p>The bidi class for “Right-to-Left Isolate” characters.
1077 <dt><u>Constant:</u> int <b>UC_BIDI_FSI</b>
1078 <a name="IDX402"></a>
1080 <dd><p>The bidi class for “First Strong Isolate” characters.
1084 <dt><u>Constant:</u> int <b>UC_BIDI_PDI</b>
1085 <a name="IDX403"></a>
1087 <dd><p>The bidi class for “Pop Directional Isolate” characters.
1090 <p>The following functions implement the association between a bidirectional
1091 category and its name.
1094 <dt><u>Function:</u> const char * <b>uc_bidi_class_name</b><i> (int <var>bidi_class</var>)</i>
1095 <a name="IDX404"></a>
1097 <dt><u>Function:</u> const char * <b>uc_bidi_category_name</b><i> (int <var>category</var>)</i>
1098 <a name="IDX405"></a>
1100 <dd><p>Returns the name of a bidi class, more precisely, the abbreviated name.
1104 <dt><u>Function:</u> const char * <b>uc_bidi_class_long_name</b><i> (int <var>bidi_class</var>)</i>
1105 <a name="IDX406"></a>
1107 <dd><p>Returns the long name of a bidi class.
1111 <dt><u>Function:</u> int <b>uc_bidi_class_byname</b><i> (const char *<var>bidi_class_name</var>)</i>
1112 <a name="IDX407"></a>
1114 <dt><u>Function:</u> int <b>uc_bidi_category_byname</b><i> (const char *<var>category_name</var>)</i>
1115 <a name="IDX408"></a>
1117 <dd><p>Returns the bidi class given by name, e.g. <code>"LRE"</code>, or by long name,
1118 e.g. <code>"Left-to-Right Embedding"</code>.
1119 This lookup ignores spaces, underscores, or hyphens as word separators and is
1123 <p>The following functions view bidirectional categories as sets of Unicode
1127 <dt><u>Function:</u> int <b>uc_bidi_class</b><i> (ucs4_t <var>uc</var>)</i>
1128 <a name="IDX409"></a>
1130 <dt><u>Function:</u> int <b>uc_bidi_category</b><i> (ucs4_t <var>uc</var>)</i>
1131 <a name="IDX410"></a>
1133 <dd><p>Returns the bidi class of a Unicode character.
1137 <dt><u>Function:</u> bool <b>uc_is_bidi_class</b><i> (ucs4_t <var>uc</var>, int <var>bidi_class</var>)</i>
1138 <a name="IDX411"></a>
1140 <dt><u>Function:</u> bool <b>uc_is_bidi_category</b><i> (ucs4_t <var>uc</var>, int <var>category</var>)</i>
1141 <a name="IDX412"></a>
1143 <dd><p>Tests whether a Unicode character belongs to a given bidi class.
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>
1151 <p>Decimal digits (like the digits from ‘<samp>0</samp>’ to ‘<samp>9</samp>’) exist in many
1152 scripts. The following function converts a decimal digit character to its
1156 <dt><u>Function:</u> int <b>uc_decimal_value</b><i> (ucs4_t <var>uc</var>)</i>
1157 <a name="IDX413"></a>
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.
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>
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.
1174 <dt><u>Function:</u> int <b>uc_digit_value</b><i> (ucs4_t <var>uc</var>)</i>
1175 <a name="IDX414"></a>
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.
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>
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.
1190 <p>The following type represents the numeric value of a Unicode character.
1192 <dt><u>Type:</u> <b>uc_fraction_t</b>
1193 <a name="IDX415"></a>
1195 <dd><p>This is a structure type with the following fields:
1196 </p><table><tr><td> </td><td><pre class="smallexample">int numerator;
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>.
1203 <p>The following function converts a number character to its numerical value.
1206 <dt><u>Function:</u> uc_fraction_t <b>uc_numeric_value</b><i> (ucs4_t <var>uc</var>)</i>
1207 <a name="IDX416"></a>
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.
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>
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.
1223 <p>The following function looks up the mirrored character of a Unicode character.
1226 <dt><u>Function:</u> bool <b>uc_mirror_char</b><i> (ucs4_t <var>uc</var>, ucs4_t *<var>puc</var>)</i>
1227 <a name="IDX417"></a>
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>.
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>
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 “Arabic shaping”
1242 takes place: the joining type and the joining group.
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>
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.
1254 <p>The joining type has the following possible values:
1257 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_U</b>
1258 <a name="IDX418"></a>
1260 <dd><p>“Non joining”: Characters of this joining type prohibit joining.
1264 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_T</b>
1265 <a name="IDX419"></a>
1267 <dd><p>“Transparent”: Characters of this joining type are skipped when
1268 considering joining.
1272 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_C</b>
1273 <a name="IDX420"></a>
1275 <dd><p>“Join causing”: Characters of this joining type cause their neighbour
1276 characters to change their shapes but don't change their own shape.
1280 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_L</b>
1281 <a name="IDX421"></a>
1283 <dd><p>“Left joining”: Characters of this joining type have two shapes,
1284 isolated and initial. Such characters currently don't exist.
1288 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_R</b>
1289 <a name="IDX422"></a>
1291 <dd><p>“Right joining”: Characters of this joining type have two shapes,
1296 <dt><u>Constant:</u> int <b>UC_JOINING_TYPE_D</b>
1297 <a name="IDX423"></a>
1299 <dd><p>“Dual joining”: Characters of this joining type have four shapes,
1300 initial, medial, final, and isolated.
1303 <p>The following functions implement the association between a joining type
1307 <dt><u>Function:</u> const char * <b>uc_joining_type_name</b><i> (int <var>joining_type</var>)</i>
1308 <a name="IDX424"></a>
1310 <dd><p>Returns the name of a joining type.
1314 <dt><u>Function:</u> const char * <b>uc_joining_type_long_name</b><i> (int <var>joining_type</var>)</i>
1315 <a name="IDX425"></a>
1317 <dd><p>Returns the long name of a joining type.
1321 <dt><u>Function:</u> int <b>uc_joining_type_byname</b><i> (const char *<var>joining_type_name</var>)</i>
1322 <a name="IDX426"></a>
1324 <dd><p>Returns the joining type given by name, e.g. <code>"D"</code>, or by long name,
1325 e.g. <code>"Dual Joining</code>.
1326 This lookup ignores spaces, underscores, or hyphens as word separators and is
1330 <p>The following function gives the joining type of every Unicode character.
1333 <dt><u>Function:</u> int <b>uc_joining_type</b><i> (ucs4_t <var>uc</var>)</i>
1334 <a name="IDX427"></a>
1336 <dd><p>Returns the joining type of a Unicode character.
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>
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.
1348 <p>The joining group has the following possible values:
1351 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_NONE</b>
1352 <a name="IDX428"></a>
1354 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_AIN</b>
1355 <a name="IDX429"></a>
1357 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_ALAPH</b>
1358 <a name="IDX430"></a>
1360 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_ALEF</b>
1361 <a name="IDX431"></a>
1363 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_BEH</b>
1364 <a name="IDX432"></a>
1366 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_BETH</b>
1367 <a name="IDX433"></a>
1369 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE</b>
1370 <a name="IDX434"></a>
1372 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_DAL</b>
1373 <a name="IDX435"></a>
1375 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_DALATH_RISH</b>
1376 <a name="IDX436"></a>
1378 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_E</b>
1379 <a name="IDX437"></a>
1381 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_FARSI_YEH</b>
1382 <a name="IDX438"></a>
1384 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_FE</b>
1385 <a name="IDX439"></a>
1387 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_FEH</b>
1388 <a name="IDX440"></a>
1390 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_FINAL_SEMKATH</b>
1391 <a name="IDX441"></a>
1393 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_GAF</b>
1394 <a name="IDX442"></a>
1396 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_GAMAL</b>
1397 <a name="IDX443"></a>
1399 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HAH</b>
1400 <a name="IDX444"></a>
1402 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HE</b>
1403 <a name="IDX445"></a>
1405 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HEH</b>
1406 <a name="IDX446"></a>
1408 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HEH_GOAL</b>
1409 <a name="IDX447"></a>
1411 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HETH</b>
1412 <a name="IDX448"></a>
1414 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_KAF</b>
1415 <a name="IDX449"></a>
1417 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_KAPH</b>
1418 <a name="IDX450"></a>
1420 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_KHAPH</b>
1421 <a name="IDX451"></a>
1423 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_KNOTTED_HEH</b>
1424 <a name="IDX452"></a>
1426 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_LAM</b>
1427 <a name="IDX453"></a>
1429 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_LAMADH</b>
1430 <a name="IDX454"></a>
1432 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MEEM</b>
1433 <a name="IDX455"></a>
1435 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MIM</b>
1436 <a name="IDX456"></a>
1438 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_NOON</b>
1439 <a name="IDX457"></a>
1441 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_NUN</b>
1442 <a name="IDX458"></a>
1444 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_NYA</b>
1445 <a name="IDX459"></a>
1447 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_PE</b>
1448 <a name="IDX460"></a>
1450 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_QAF</b>
1451 <a name="IDX461"></a>
1453 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_QAPH</b>
1454 <a name="IDX462"></a>
1456 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_REH</b>
1457 <a name="IDX463"></a>
1459 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_REVERSED_PE</b>
1460 <a name="IDX464"></a>
1462 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SAD</b>
1463 <a name="IDX465"></a>
1465 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SADHE</b>
1466 <a name="IDX466"></a>
1468 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SEEN</b>
1469 <a name="IDX467"></a>
1471 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SEMKATH</b>
1472 <a name="IDX468"></a>
1474 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SHIN</b>
1475 <a name="IDX469"></a>
1477 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SWASH_KAF</b>
1478 <a name="IDX470"></a>
1480 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_SYRIAC_WAW</b>
1481 <a name="IDX471"></a>
1483 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_TAH</b>
1484 <a name="IDX472"></a>
1486 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_TAW</b>
1487 <a name="IDX473"></a>
1489 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_TEH_MARBUTA</b>
1490 <a name="IDX474"></a>
1492 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_TEH_MARBUTA_GOAL</b>
1493 <a name="IDX475"></a>
1495 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_TETH</b>
1496 <a name="IDX476"></a>
1498 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_WAW</b>
1499 <a name="IDX477"></a>
1501 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_YEH</b>
1502 <a name="IDX478"></a>
1504 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_YEH_BARREE</b>
1505 <a name="IDX479"></a>
1507 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_YEH_WITH_TAIL</b>
1508 <a name="IDX480"></a>
1510 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_YUDH</b>
1511 <a name="IDX481"></a>
1513 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_YUDH_HE</b>
1514 <a name="IDX482"></a>
1516 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_ZAIN</b>
1517 <a name="IDX483"></a>
1519 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_ZHAIN</b>
1520 <a name="IDX484"></a>
1522 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_ROHINGYA_YEH</b>
1523 <a name="IDX485"></a>
1525 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_STRAIGHT_WAW</b>
1526 <a name="IDX486"></a>
1528 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_ALEPH</b>
1529 <a name="IDX487"></a>
1531 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_BETH</b>
1532 <a name="IDX488"></a>
1534 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_GIMEL</b>
1535 <a name="IDX489"></a>
1537 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_DALETH</b>
1538 <a name="IDX490"></a>
1540 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_WAW</b>
1541 <a name="IDX491"></a>
1543 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_ZAYIN</b>
1544 <a name="IDX492"></a>
1546 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_HETH</b>
1547 <a name="IDX493"></a>
1549 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_TETH</b>
1550 <a name="IDX494"></a>
1552 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_YODH</b>
1553 <a name="IDX495"></a>
1555 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_KAPH</b>
1556 <a name="IDX496"></a>
1558 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_LAMEDH</b>
1559 <a name="IDX497"></a>
1561 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_DHAMEDH</b>
1562 <a name="IDX498"></a>
1564 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_THAMEDH</b>
1565 <a name="IDX499"></a>
1567 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_MEM</b>
1568 <a name="IDX500"></a>
1570 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_NUN</b>
1571 <a name="IDX501"></a>
1573 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_SAMEKH</b>
1574 <a name="IDX502"></a>
1576 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_AYIN</b>
1577 <a name="IDX503"></a>
1579 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_PE</b>
1580 <a name="IDX504"></a>
1582 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_SADHE</b>
1583 <a name="IDX505"></a>
1585 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_QOPH</b>
1586 <a name="IDX506"></a>
1588 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_RESH</b>
1589 <a name="IDX507"></a>
1591 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_TAW</b>
1592 <a name="IDX508"></a>
1594 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_ONE</b>
1595 <a name="IDX509"></a>
1597 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_FIVE</b>
1598 <a name="IDX510"></a>
1600 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_TEN</b>
1601 <a name="IDX511"></a>
1603 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_TWENTY</b>
1604 <a name="IDX512"></a>
1606 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MANICHAEAN_HUNDRED</b>
1607 <a name="IDX513"></a>
1609 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_AFRICAN_FEH</b>
1610 <a name="IDX514"></a>
1612 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_AFRICAN_QAF</b>
1613 <a name="IDX515"></a>
1615 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_AFRICAN_NOON</b>
1616 <a name="IDX516"></a>
1618 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_NGA</b>
1619 <a name="IDX517"></a>
1621 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_JA</b>
1622 <a name="IDX518"></a>
1624 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_NYA</b>
1625 <a name="IDX519"></a>
1627 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_TTA</b>
1628 <a name="IDX520"></a>
1630 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_NNA</b>
1631 <a name="IDX521"></a>
1633 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_NNNA</b>
1634 <a name="IDX522"></a>
1636 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_BHA</b>
1637 <a name="IDX523"></a>
1639 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_RA</b>
1640 <a name="IDX524"></a>
1642 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_LLA</b>
1643 <a name="IDX525"></a>
1645 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_LLLA</b>
1646 <a name="IDX526"></a>
1648 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_MALAYALAM_SSA</b>
1649 <a name="IDX527"></a>
1651 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HANIFI_ROHINGYA_PA</b>
1652 <a name="IDX528"></a>
1654 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA</b>
1655 <a name="IDX529"></a>
1657 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_THIN_YEH</b>
1658 <a name="IDX530"></a>
1660 <dt><u>Constant:</u> int <b>UC_JOINING_GROUP_VERTICAL_TAIL</b>
1661 <a name="IDX531"></a>
1665 <p>The following functions implement the association between a joining group
1669 <dt><u>Function:</u> const char * <b>uc_joining_group_name</b><i> (int <var>joining_group</var>)</i>
1670 <a name="IDX532"></a>
1672 <dd><p>Returns the name of a joining group.
1676 <dt><u>Function:</u> int <b>uc_joining_group_byname</b><i> (const char *<var>joining_group_name</var>)</i>
1677 <a name="IDX533"></a>
1679 <dd><p>Returns the joining group given by name, e.g. <code>"Teh_Marbuta"</code>.
1680 This lookup ignores spaces, underscores, or hyphens as word separators and is
1684 <p>The following function gives the joining group of every Unicode character.
1687 <dt><u>Function:</u> int <b>uc_joining_group</b><i> (ucs4_t <var>uc</var>)</i>
1688 <a name="IDX534"></a>
1690 <dd><p>Returns the joining group of a Unicode character.
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>
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
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.
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 – the object oriented API</a> </h3>
1714 <p>The following type designates a property on Unicode characters.
1717 <dt><u>Type:</u> <b>uc_property_t</b>
1718 <a name="IDX535"></a>
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.
1725 <p>Many Unicode properties are predefined.
1727 <p>The following are general properties.
1730 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_WHITE_SPACE</b>
1731 <a name="IDX536"></a>
1733 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ALPHABETIC</b>
1734 <a name="IDX537"></a>
1736 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_ALPHABETIC</b>
1737 <a name="IDX538"></a>
1739 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_NOT_A_CHARACTER</b>
1740 <a name="IDX539"></a>
1742 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT</b>
1743 <a name="IDX540"></a>
1745 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT</b>
1746 <a name="IDX541"></a>
1748 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_DEPRECATED</b>
1749 <a name="IDX542"></a>
1751 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_LOGICAL_ORDER_EXCEPTION</b>
1752 <a name="IDX543"></a>
1754 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_VARIATION_SELECTOR</b>
1755 <a name="IDX544"></a>
1757 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PRIVATE_USE</b>
1758 <a name="IDX545"></a>
1760 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_UNASSIGNED_CODE_VALUE</b>
1761 <a name="IDX546"></a>
1765 <p>The following properties are related to case folding.
1768 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_UPPERCASE</b>
1769 <a name="IDX547"></a>
1771 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_UPPERCASE</b>
1772 <a name="IDX548"></a>
1774 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_LOWERCASE</b>
1775 <a name="IDX549"></a>
1777 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_LOWERCASE</b>
1778 <a name="IDX550"></a>
1780 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_TITLECASE</b>
1781 <a name="IDX551"></a>
1783 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CASED</b>
1784 <a name="IDX552"></a>
1786 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CASE_IGNORABLE</b>
1787 <a name="IDX553"></a>
1789 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CHANGES_WHEN_LOWERCASED</b>
1790 <a name="IDX554"></a>
1792 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CHANGES_WHEN_UPPERCASED</b>
1793 <a name="IDX555"></a>
1795 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CHANGES_WHEN_TITLECASED</b>
1796 <a name="IDX556"></a>
1798 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CHANGES_WHEN_CASEFOLDED</b>
1799 <a name="IDX557"></a>
1801 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CHANGES_WHEN_CASEMAPPED</b>
1802 <a name="IDX558"></a>
1804 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_SOFT_DOTTED</b>
1805 <a name="IDX559"></a>
1809 <p>The following properties are related to identifiers.
1812 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ID_START</b>
1813 <a name="IDX560"></a>
1815 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_ID_START</b>
1816 <a name="IDX561"></a>
1818 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ID_CONTINUE</b>
1819 <a name="IDX562"></a>
1821 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_ID_CONTINUE</b>
1822 <a name="IDX563"></a>
1824 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_XID_START</b>
1825 <a name="IDX564"></a>
1827 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_XID_CONTINUE</b>
1828 <a name="IDX565"></a>
1830 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PATTERN_WHITE_SPACE</b>
1831 <a name="IDX566"></a>
1833 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PATTERN_SYNTAX</b>
1834 <a name="IDX567"></a>
1838 <p>The following properties have an influence on shaping and rendering.
1841 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_JOIN_CONTROL</b>
1842 <a name="IDX568"></a>
1844 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_GRAPHEME_BASE</b>
1845 <a name="IDX569"></a>
1847 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_GRAPHEME_EXTEND</b>
1848 <a name="IDX570"></a>
1850 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_GRAPHEME_EXTEND</b>
1851 <a name="IDX571"></a>
1853 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_GRAPHEME_LINK</b>
1854 <a name="IDX572"></a>
1858 <p>The following properties relate to bidirectional reordering.
1861 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_CONTROL</b>
1862 <a name="IDX573"></a>
1864 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_LEFT_TO_RIGHT</b>
1865 <a name="IDX574"></a>
1867 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT</b>
1868 <a name="IDX575"></a>
1870 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT</b>
1871 <a name="IDX576"></a>
1873 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_EUROPEAN_DIGIT</b>
1874 <a name="IDX577"></a>
1876 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR</b>
1877 <a name="IDX578"></a>
1879 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR</b>
1880 <a name="IDX579"></a>
1882 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_ARABIC_DIGIT</b>
1883 <a name="IDX580"></a>
1885 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_COMMON_SEPARATOR</b>
1886 <a name="IDX581"></a>
1888 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_BLOCK_SEPARATOR</b>
1889 <a name="IDX582"></a>
1891 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_SEGMENT_SEPARATOR</b>
1892 <a name="IDX583"></a>
1894 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_WHITESPACE</b>
1895 <a name="IDX584"></a>
1897 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_NON_SPACING_MARK</b>
1898 <a name="IDX585"></a>
1900 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL</b>
1901 <a name="IDX586"></a>
1903 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_PDF</b>
1904 <a name="IDX587"></a>
1906 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE</b>
1907 <a name="IDX588"></a>
1909 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_BIDI_OTHER_NEUTRAL</b>
1910 <a name="IDX589"></a>
1914 <p>The following properties deal with number representations.
1917 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_HEX_DIGIT</b>
1918 <a name="IDX590"></a>
1920 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ASCII_HEX_DIGIT</b>
1921 <a name="IDX591"></a>
1925 <p>The following properties deal with CJK.
1928 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_IDEOGRAPHIC</b>
1929 <a name="IDX592"></a>
1931 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_UNIFIED_IDEOGRAPH</b>
1932 <a name="IDX593"></a>
1934 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_RADICAL</b>
1935 <a name="IDX594"></a>
1937 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_IDS_BINARY_OPERATOR</b>
1938 <a name="IDX595"></a>
1940 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_IDS_TRINARY_OPERATOR</b>
1941 <a name="IDX596"></a>
1945 <p>The following properties deal with pictographic symbols.
1948 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_EMOJI</b>
1949 <a name="IDX597"></a>
1951 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_EMOJI_PRESENTATION</b>
1952 <a name="IDX598"></a>
1954 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_EMOJI_MODIFIER</b>
1955 <a name="IDX599"></a>
1957 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_EMOJI_MODIFIER_BASE</b>
1958 <a name="IDX600"></a>
1960 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_EMOJI_COMPONENT</b>
1961 <a name="IDX601"></a>
1963 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_EXTENDED_PICTOGRAPHIC</b>
1964 <a name="IDX602"></a>
1968 <p>Other miscellaneous properties are:
1971 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ZERO_WIDTH</b>
1972 <a name="IDX603"></a>
1974 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_SPACE</b>
1975 <a name="IDX604"></a>
1977 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_NON_BREAK</b>
1978 <a name="IDX605"></a>
1980 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_ISO_CONTROL</b>
1981 <a name="IDX606"></a>
1983 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_FORMAT_CONTROL</b>
1984 <a name="IDX607"></a>
1986 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_DASH</b>
1987 <a name="IDX608"></a>
1989 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_HYPHEN</b>
1990 <a name="IDX609"></a>
1992 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PUNCTUATION</b>
1993 <a name="IDX610"></a>
1995 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_LINE_SEPARATOR</b>
1996 <a name="IDX611"></a>
1998 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PARAGRAPH_SEPARATOR</b>
1999 <a name="IDX612"></a>
2001 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_QUOTATION_MARK</b>
2002 <a name="IDX613"></a>
2004 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_SENTENCE_TERMINAL</b>
2005 <a name="IDX614"></a>
2007 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_TERMINAL_PUNCTUATION</b>
2008 <a name="IDX615"></a>
2010 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_CURRENCY_SYMBOL</b>
2011 <a name="IDX616"></a>
2013 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_MATH</b>
2014 <a name="IDX617"></a>
2016 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_OTHER_MATH</b>
2017 <a name="IDX618"></a>
2019 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_PAIRED_PUNCTUATION</b>
2020 <a name="IDX619"></a>
2022 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_LEFT_OF_PAIR</b>
2023 <a name="IDX620"></a>
2025 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_COMBINING</b>
2026 <a name="IDX621"></a>
2028 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_COMPOSITE</b>
2029 <a name="IDX622"></a>
2031 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_DECIMAL_DIGIT</b>
2032 <a name="IDX623"></a>
2034 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_NUMERIC</b>
2035 <a name="IDX624"></a>
2037 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_DIACRITIC</b>
2038 <a name="IDX625"></a>
2040 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_EXTENDER</b>
2041 <a name="IDX626"></a>
2043 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_IGNORABLE_CONTROL</b>
2044 <a name="IDX627"></a>
2046 <dt><u>Constant:</u> uc_property_t <b>UC_PROPERTY_REGIONAL_INDICATOR</b>
2047 <a name="IDX628"></a>
2051 <p>The following function looks up a property by its name.
2054 <dt><u>Function:</u> uc_property_t <b>uc_property_byname</b><i> (const char *<var>property_name</var>)</i>
2055 <a name="IDX629"></a>
2057 <dd><p>Returns the property given by name, e.g. <code>"White space"</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.
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 ‘<tt>PropertyAliases.txt</tt>’ file.
2067 <p>This function references a big table of all predefined properties. Its use
2068 can significantly increase the size of your application.
2072 <dt><u>Function:</u> bool <b>uc_property_is_valid</b><i> (uc_property_t property)</i>
2073 <a name="IDX630"></a>
2075 <dd><p>Returns <code>true</code> when the given property is valid, or <code>false</code>
2079 <p>The following function views a property as a set of Unicode characters.
2082 <dt><u>Function:</u> bool <b>uc_is_property</b><i> (ucs4_t <var>uc</var>, uc_property_t <var>property</var>)</i>
2083 <a name="IDX631"></a>
2085 <dd><p>Tests whether the Unicode character <var>uc</var> has the given property.
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 – the functional API</a> </h3>
2093 <p>The following are general properties.
2096 <dt><u>Function:</u> bool <b>uc_is_property_white_space</b><i> (ucs4_t <var>uc</var>)</i>
2097 <a name="IDX632"></a>
2099 <dt><u>Function:</u> bool <b>uc_is_property_alphabetic</b><i> (ucs4_t <var>uc</var>)</i>
2100 <a name="IDX633"></a>
2102 <dt><u>Function:</u> bool <b>uc_is_property_other_alphabetic</b><i> (ucs4_t <var>uc</var>)</i>
2103 <a name="IDX634"></a>
2105 <dt><u>Function:</u> bool <b>uc_is_property_not_a_character</b><i> (ucs4_t <var>uc</var>)</i>
2106 <a name="IDX635"></a>
2108 <dt><u>Function:</u> bool <b>uc_is_property_default_ignorable_code_point</b><i> (ucs4_t <var>uc</var>)</i>
2109 <a name="IDX636"></a>
2111 <dt><u>Function:</u> bool <b>uc_is_property_other_default_ignorable_code_point</b><i> (ucs4_t <var>uc</var>)</i>
2112 <a name="IDX637"></a>
2114 <dt><u>Function:</u> bool <b>uc_is_property_deprecated</b><i> (ucs4_t <var>uc</var>)</i>
2115 <a name="IDX638"></a>
2117 <dt><u>Function:</u> bool <b>uc_is_property_logical_order_exception</b><i> (ucs4_t <var>uc</var>)</i>
2118 <a name="IDX639"></a>
2120 <dt><u>Function:</u> bool <b>uc_is_property_variation_selector</b><i> (ucs4_t <var>uc</var>)</i>
2121 <a name="IDX640"></a>
2123 <dt><u>Function:</u> bool <b>uc_is_property_private_use</b><i> (ucs4_t <var>uc</var>)</i>
2124 <a name="IDX641"></a>
2126 <dt><u>Function:</u> bool <b>uc_is_property_unassigned_code_value</b><i> (ucs4_t <var>uc</var>)</i>
2127 <a name="IDX642"></a>
2131 <p>The following properties are related to case folding.
2134 <dt><u>Function:</u> bool <b>uc_is_property_uppercase</b><i> (ucs4_t <var>uc</var>)</i>
2135 <a name="IDX643"></a>
2137 <dt><u>Function:</u> bool <b>uc_is_property_other_uppercase</b><i> (ucs4_t <var>uc</var>)</i>
2138 <a name="IDX644"></a>
2140 <dt><u>Function:</u> bool <b>uc_is_property_lowercase</b><i> (ucs4_t <var>uc</var>)</i>
2141 <a name="IDX645"></a>
2143 <dt><u>Function:</u> bool <b>uc_is_property_other_lowercase</b><i> (ucs4_t <var>uc</var>)</i>
2144 <a name="IDX646"></a>
2146 <dt><u>Function:</u> bool <b>uc_is_property_titlecase</b><i> (ucs4_t <var>uc</var>)</i>
2147 <a name="IDX647"></a>
2149 <dt><u>Function:</u> bool <b>uc_is_property_cased</b><i> (ucs4_t <var>uc</var>)</i>
2150 <a name="IDX648"></a>
2152 <dt><u>Function:</u> bool <b>uc_is_property_case_ignorable</b><i> (ucs4_t <var>uc</var>)</i>
2153 <a name="IDX649"></a>
2155 <dt><u>Function:</u> bool <b>uc_is_property_changes_when_lowercased</b><i> (ucs4_t <var>uc</var>)</i>
2156 <a name="IDX650"></a>
2158 <dt><u>Function:</u> bool <b>uc_is_property_changes_when_uppercased</b><i> (ucs4_t <var>uc</var>)</i>
2159 <a name="IDX651"></a>
2161 <dt><u>Function:</u> bool <b>uc_is_property_changes_when_titlecased</b><i> (ucs4_t <var>uc</var>)</i>
2162 <a name="IDX652"></a>
2164 <dt><u>Function:</u> bool <b>uc_is_property_changes_when_casefolded</b><i> (ucs4_t <var>uc</var>)</i>
2165 <a name="IDX653"></a>
2167 <dt><u>Function:</u> bool <b>uc_is_property_changes_when_casemapped</b><i> (ucs4_t <var>uc</var>)</i>
2168 <a name="IDX654"></a>
2170 <dt><u>Function:</u> bool <b>uc_is_property_soft_dotted</b><i> (ucs4_t <var>uc</var>)</i>
2171 <a name="IDX655"></a>
2175 <p>The following properties are related to identifiers.
2178 <dt><u>Function:</u> bool <b>uc_is_property_id_start</b><i> (ucs4_t <var>uc</var>)</i>
2179 <a name="IDX656"></a>
2181 <dt><u>Function:</u> bool <b>uc_is_property_other_id_start</b><i> (ucs4_t <var>uc</var>)</i>
2182 <a name="IDX657"></a>
2184 <dt><u>Function:</u> bool <b>uc_is_property_id_continue</b><i> (ucs4_t <var>uc</var>)</i>
2185 <a name="IDX658"></a>
2187 <dt><u>Function:</u> bool <b>uc_is_property_other_id_continue</b><i> (ucs4_t <var>uc</var>)</i>
2188 <a name="IDX659"></a>
2190 <dt><u>Function:</u> bool <b>uc_is_property_xid_start</b><i> (ucs4_t <var>uc</var>)</i>
2191 <a name="IDX660"></a>
2193 <dt><u>Function:</u> bool <b>uc_is_property_xid_continue</b><i> (ucs4_t <var>uc</var>)</i>
2194 <a name="IDX661"></a>
2196 <dt><u>Function:</u> bool <b>uc_is_property_pattern_white_space</b><i> (ucs4_t <var>uc</var>)</i>
2197 <a name="IDX662"></a>
2199 <dt><u>Function:</u> bool <b>uc_is_property_pattern_syntax</b><i> (ucs4_t <var>uc</var>)</i>
2200 <a name="IDX663"></a>
2204 <p>The following properties have an influence on shaping and rendering.
2207 <dt><u>Function:</u> bool <b>uc_is_property_join_control</b><i> (ucs4_t <var>uc</var>)</i>
2208 <a name="IDX664"></a>
2210 <dt><u>Function:</u> bool <b>uc_is_property_grapheme_base</b><i> (ucs4_t <var>uc</var>)</i>
2211 <a name="IDX665"></a>
2213 <dt><u>Function:</u> bool <b>uc_is_property_grapheme_extend</b><i> (ucs4_t <var>uc</var>)</i>
2214 <a name="IDX666"></a>
2216 <dt><u>Function:</u> bool <b>uc_is_property_other_grapheme_extend</b><i> (ucs4_t <var>uc</var>)</i>
2217 <a name="IDX667"></a>
2219 <dt><u>Function:</u> bool <b>uc_is_property_grapheme_link</b><i> (ucs4_t <var>uc</var>)</i>
2220 <a name="IDX668"></a>
2224 <p>The following properties relate to bidirectional reordering.
2227 <dt><u>Function:</u> bool <b>uc_is_property_bidi_control</b><i> (ucs4_t <var>uc</var>)</i>
2228 <a name="IDX669"></a>
2230 <dt><u>Function:</u> bool <b>uc_is_property_bidi_left_to_right</b><i> (ucs4_t <var>uc</var>)</i>
2231 <a name="IDX670"></a>
2233 <dt><u>Function:</u> bool <b>uc_is_property_bidi_hebrew_right_to_left</b><i> (ucs4_t <var>uc</var>)</i>
2234 <a name="IDX671"></a>
2236 <dt><u>Function:</u> bool <b>uc_is_property_bidi_arabic_right_to_left</b><i> (ucs4_t <var>uc</var>)</i>
2237 <a name="IDX672"></a>
2239 <dt><u>Function:</u> bool <b>uc_is_property_bidi_european_digit</b><i> (ucs4_t <var>uc</var>)</i>
2240 <a name="IDX673"></a>
2242 <dt><u>Function:</u> bool <b>uc_is_property_bidi_eur_num_separator</b><i> (ucs4_t <var>uc</var>)</i>
2243 <a name="IDX674"></a>
2245 <dt><u>Function:</u> bool <b>uc_is_property_bidi_eur_num_terminator</b><i> (ucs4_t <var>uc</var>)</i>
2246 <a name="IDX675"></a>
2248 <dt><u>Function:</u> bool <b>uc_is_property_bidi_arabic_digit</b><i> (ucs4_t <var>uc</var>)</i>
2249 <a name="IDX676"></a>
2251 <dt><u>Function:</u> bool <b>uc_is_property_bidi_common_separator</b><i> (ucs4_t <var>uc</var>)</i>
2252 <a name="IDX677"></a>
2254 <dt><u>Function:</u> bool <b>uc_is_property_bidi_block_separator</b><i> (ucs4_t <var>uc</var>)</i>
2255 <a name="IDX678"></a>
2257 <dt><u>Function:</u> bool <b>uc_is_property_bidi_segment_separator</b><i> (ucs4_t <var>uc</var>)</i>
2258 <a name="IDX679"></a>
2260 <dt><u>Function:</u> bool <b>uc_is_property_bidi_whitespace</b><i> (ucs4_t <var>uc</var>)</i>
2261 <a name="IDX680"></a>
2263 <dt><u>Function:</u> bool <b>uc_is_property_bidi_non_spacing_mark</b><i> (ucs4_t <var>uc</var>)</i>
2264 <a name="IDX681"></a>
2266 <dt><u>Function:</u> bool <b>uc_is_property_bidi_boundary_neutral</b><i> (ucs4_t <var>uc</var>)</i>
2267 <a name="IDX682"></a>
2269 <dt><u>Function:</u> bool <b>uc_is_property_bidi_pdf</b><i> (ucs4_t <var>uc</var>)</i>
2270 <a name="IDX683"></a>
2272 <dt><u>Function:</u> bool <b>uc_is_property_bidi_embedding_or_override</b><i> (ucs4_t <var>uc</var>)</i>
2273 <a name="IDX684"></a>
2275 <dt><u>Function:</u> bool <b>uc_is_property_bidi_other_neutral</b><i> (ucs4_t <var>uc</var>)</i>
2276 <a name="IDX685"></a>
2280 <p>The following properties deal with number representations.
2283 <dt><u>Function:</u> bool <b>uc_is_property_hex_digit</b><i> (ucs4_t <var>uc</var>)</i>
2284 <a name="IDX686"></a>
2286 <dt><u>Function:</u> bool <b>uc_is_property_ascii_hex_digit</b><i> (ucs4_t <var>uc</var>)</i>
2287 <a name="IDX687"></a>
2291 <p>The following properties deal with CJK.
2294 <dt><u>Function:</u> bool <b>uc_is_property_ideographic</b><i> (ucs4_t <var>uc</var>)</i>
2295 <a name="IDX688"></a>
2297 <dt><u>Function:</u> bool <b>uc_is_property_unified_ideograph</b><i> (ucs4_t <var>uc</var>)</i>
2298 <a name="IDX689"></a>
2300 <dt><u>Function:</u> bool <b>uc_is_property_radical</b><i> (ucs4_t <var>uc</var>)</i>
2301 <a name="IDX690"></a>
2303 <dt><u>Function:</u> bool <b>uc_is_property_ids_binary_operator</b><i> (ucs4_t <var>uc</var>)</i>
2304 <a name="IDX691"></a>
2306 <dt><u>Function:</u> bool <b>uc_is_property_ids_trinary_operator</b><i> (ucs4_t <var>uc</var>)</i>
2307 <a name="IDX692"></a>
2311 <p>The following properties deal with pictographic symbols.
2314 <dt><u>Function:</u> bool <b>uc_is_property_emoji</b><i> (ucs4_t <var>uc</var>)</i>
2315 <a name="IDX693"></a>
2317 <dt><u>Function:</u> bool <b>uc_is_property_emoji_presentation</b><i> (ucs4_t <var>uc</var>)</i>
2318 <a name="IDX694"></a>
2320 <dt><u>Function:</u> bool <b>uc_is_property_emoji_modifier</b><i> (ucs4_t <var>uc</var>)</i>
2321 <a name="IDX695"></a>
2323 <dt><u>Function:</u> bool <b>uc_is_property_emoji_modifier_base</b><i> (ucs4_t <var>uc</var>)</i>
2324 <a name="IDX696"></a>
2326 <dt><u>Function:</u> bool <b>uc_is_property_emoji_component</b><i> (ucs4_t <var>uc</var>)</i>
2327 <a name="IDX697"></a>
2329 <dt><u>Function:</u> bool <b>uc_is_property_extended_pictographic</b><i> (ucs4_t <var>uc</var>)</i>
2330 <a name="IDX698"></a>
2334 <p>Other miscellaneous properties are:
2337 <dt><u>Function:</u> bool <b>uc_is_property_zero_width</b><i> (ucs4_t <var>uc</var>)</i>
2338 <a name="IDX699"></a>
2340 <dt><u>Function:</u> bool <b>uc_is_property_space</b><i> (ucs4_t <var>uc</var>)</i>
2341 <a name="IDX700"></a>
2343 <dt><u>Function:</u> bool <b>uc_is_property_non_break</b><i> (ucs4_t <var>uc</var>)</i>
2344 <a name="IDX701"></a>
2346 <dt><u>Function:</u> bool <b>uc_is_property_iso_control</b><i> (ucs4_t <var>uc</var>)</i>
2347 <a name="IDX702"></a>
2349 <dt><u>Function:</u> bool <b>uc_is_property_format_control</b><i> (ucs4_t <var>uc</var>)</i>
2350 <a name="IDX703"></a>
2352 <dt><u>Function:</u> bool <b>uc_is_property_dash</b><i> (ucs4_t <var>uc</var>)</i>
2353 <a name="IDX704"></a>
2355 <dt><u>Function:</u> bool <b>uc_is_property_hyphen</b><i> (ucs4_t <var>uc</var>)</i>
2356 <a name="IDX705"></a>
2358 <dt><u>Function:</u> bool <b>uc_is_property_punctuation</b><i> (ucs4_t <var>uc</var>)</i>
2359 <a name="IDX706"></a>
2361 <dt><u>Function:</u> bool <b>uc_is_property_line_separator</b><i> (ucs4_t <var>uc</var>)</i>
2362 <a name="IDX707"></a>
2364 <dt><u>Function:</u> bool <b>uc_is_property_paragraph_separator</b><i> (ucs4_t <var>uc</var>)</i>
2365 <a name="IDX708"></a>
2367 <dt><u>Function:</u> bool <b>uc_is_property_quotation_mark</b><i> (ucs4_t <var>uc</var>)</i>
2368 <a name="IDX709"></a>
2370 <dt><u>Function:</u> bool <b>uc_is_property_sentence_terminal</b><i> (ucs4_t <var>uc</var>)</i>
2371 <a name="IDX710"></a>
2373 <dt><u>Function:</u> bool <b>uc_is_property_terminal_punctuation</b><i> (ucs4_t <var>uc</var>)</i>
2374 <a name="IDX711"></a>
2376 <dt><u>Function:</u> bool <b>uc_is_property_currency_symbol</b><i> (ucs4_t <var>uc</var>)</i>
2377 <a name="IDX712"></a>
2379 <dt><u>Function:</u> bool <b>uc_is_property_math</b><i> (ucs4_t <var>uc</var>)</i>
2380 <a name="IDX713"></a>
2382 <dt><u>Function:</u> bool <b>uc_is_property_other_math</b><i> (ucs4_t <var>uc</var>)</i>
2383 <a name="IDX714"></a>
2385 <dt><u>Function:</u> bool <b>uc_is_property_paired_punctuation</b><i> (ucs4_t <var>uc</var>)</i>
2386 <a name="IDX715"></a>
2388 <dt><u>Function:</u> bool <b>uc_is_property_left_of_pair</b><i> (ucs4_t <var>uc</var>)</i>
2389 <a name="IDX716"></a>
2391 <dt><u>Function:</u> bool <b>uc_is_property_combining</b><i> (ucs4_t <var>uc</var>)</i>
2392 <a name="IDX717"></a>
2394 <dt><u>Function:</u> bool <b>uc_is_property_composite</b><i> (ucs4_t <var>uc</var>)</i>
2395 <a name="IDX718"></a>
2397 <dt><u>Function:</u> bool <b>uc_is_property_decimal_digit</b><i> (ucs4_t <var>uc</var>)</i>
2398 <a name="IDX719"></a>
2400 <dt><u>Function:</u> bool <b>uc_is_property_numeric</b><i> (ucs4_t <var>uc</var>)</i>
2401 <a name="IDX720"></a>
2403 <dt><u>Function:</u> bool <b>uc_is_property_diacritic</b><i> (ucs4_t <var>uc</var>)</i>
2404 <a name="IDX721"></a>
2406 <dt><u>Function:</u> bool <b>uc_is_property_extender</b><i> (ucs4_t <var>uc</var>)</i>
2407 <a name="IDX722"></a>
2409 <dt><u>Function:</u> bool <b>uc_is_property_ignorable_control</b><i> (ucs4_t <var>uc</var>)</i>
2410 <a name="IDX723"></a>
2412 <dt><u>Function:</u> bool <b>uc_is_property_regional_indicator</b><i> (ucs4_t <var>uc</var>)</i>
2413 <a name="IDX724"></a>
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>
2422 <p>The Unicode characters are subdivided into scripts.
2424 <p>The following type is used to represent a script:
2427 <dt><u>Type:</u> <b>uc_script_t</b>
2428 <a name="IDX725"></a>
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> </td><td><pre class="smallexample">const char *name;
2433 </pre></td></tr></table>
2435 <p>The <code>name</code> field contains the name of the script.
2438 <a name="IDX726"></a>
2439 <p>The following functions look up a script.
2442 <dt><u>Function:</u> const uc_script_t * <b>uc_script</b><i> (ucs4_t <var>uc</var>)</i>
2443 <a name="IDX727"></a>
2445 <dd><p>Returns the script of a Unicode character. Returns NULL if <var>uc</var> does not
2446 belong to any script.
2450 <dt><u>Function:</u> const uc_script_t * <b>uc_script_byname</b><i> (const char *<var>script_name</var>)</i>
2451 <a name="IDX728"></a>
2453 <dd><p>Returns the script given by its name, e.g. <code>"HAN"</code>. Returns NULL if a
2454 script with the given name does not exist.
2457 <p>The following function views a script as a set of Unicode characters.
2460 <dt><u>Function:</u> bool <b>uc_is_script</b><i> (ucs4_t <var>uc</var>, const uc_script_t *<var>script</var>)</i>
2461 <a name="IDX729"></a>
2463 <dd><p>Tests whether a Unicode character belongs to a given script.
2466 <p>The following gives a global picture of all scripts.
2469 <dt><u>Function:</u> void <b>uc_all_scripts</b><i> (const uc_script_t **<var>scripts</var>, size_t *<var>count</var>)</i>
2470 <a name="IDX730"></a>
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>.
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>
2481 <p>The Unicode characters are subdivided into blocks. A block is an interval of
2482 Unicode code points.
2484 <p>The following type is used to represent a block.
2487 <dt><u>Type:</u> <b>uc_block_t</b>
2488 <a name="IDX731"></a>
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> </td><td><pre class="smallexample">ucs4_t start;
2495 </pre></td></tr></table>
2497 <p>The <code>start</code> field is the first Unicode code point in the block.
2499 <p>The <code>end</code> field is the last Unicode code point in the block.
2501 <p>The <code>name</code> field is the name of the block.
2504 <a name="IDX732"></a>
2505 <p>The following function looks up a block.
2508 <dt><u>Function:</u> const uc_block_t * <b>uc_block</b><i> (ucs4_t <var>uc</var>)</i>
2509 <a name="IDX733"></a>
2511 <dd><p>Returns the block a character belongs to.
2514 <p>The following function views a block as a set of Unicode characters.
2517 <dt><u>Function:</u> bool <b>uc_is_block</b><i> (ucs4_t <var>uc</var>, const uc_block_t *<var>block</var>)</i>
2518 <a name="IDX734"></a>
2520 <dd><p>Tests whether a Unicode character belongs to a given block.
2523 <p>The following gives a global picture of all block.
2526 <dt><u>Function:</u> void <b>uc_all_blocks</b><i> (const uc_block_t **<var>blocks</var>, size_t *<var>count</var>)</i>
2527 <a name="IDX735"></a>
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>.
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>
2538 <p>The following properties are taken from language standards. The supported
2539 language standards are ISO C 99 and Java.
2542 <dt><u>Function:</u> bool <b>uc_is_c_whitespace</b><i> (ucs4_t <var>uc</var>)</i>
2543 <a name="IDX736"></a>
2545 <dd><p>Tests whether a Unicode character is considered whitespace in ISO C 99.
2549 <dt><u>Function:</u> bool <b>uc_is_java_whitespace</b><i> (ucs4_t <var>uc</var>)</i>
2550 <a name="IDX737"></a>
2552 <dd><p>Tests whether a Unicode character is considered whitespace in Java.
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>.
2559 <dt><u>Constant:</u> int <b>UC_IDENTIFIER_START</b>
2560 <a name="IDX738"></a>
2562 <dd><p>This return value means that the given character is valid as first or
2563 subsequent character in an identifier.
2567 <dt><u>Constant:</u> int <b>UC_IDENTIFIER_VALID</b>
2568 <a name="IDX739"></a>
2570 <dd><p>This return value means that the given character is valid as subsequent
2575 <dt><u>Constant:</u> int <b>UC_IDENTIFIER_INVALID</b>
2576 <a name="IDX740"></a>
2578 <dd><p>This return value means that the given character is not valid in an identifier.
2582 <dt><u>Constant:</u> int <b>UC_IDENTIFIER_IGNORABLE</b>
2583 <a name="IDX741"></a>
2585 <dd><p>This return value (only for Java) means that the given character is ignorable.
2588 <p>The following function determine whether a given character can be a constituent
2589 of an identifier in the given programming language.
2591 <a name="IDX742"></a>
2593 <dt><u>Function:</u> int <b>uc_c_ident_category</b><i> (ucs4_t <var>uc</var>)</i>
2594 <a name="IDX743"></a>
2596 <dd><p>Returns the categorization of a Unicode character with respect to the ISO C 99
2600 <a name="IDX744"></a>
2602 <dt><u>Function:</u> int <b>uc_java_ident_category</b><i> (ucs4_t <var>uc</var>)</i>
2603 <a name="IDX745"></a>
2605 <dd><p>Returns the categorization of a Unicode character with respect to the Java
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>
2614 <p>The following character classifications mimic those declared in the ISO C
2615 header files <code><ctype.h></code> and <code><wctype.h></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.
2622 <dt><u>Function:</u> bool <b>uc_is_alnum</b><i> (ucs4_t <var>uc</var>)</i>
2623 <a name="IDX746"></a>
2625 <dd><p>Tests for any character for which <code>uc_is_alpha</code> or <code>uc_is_digit</code> is
2630 <dt><u>Function:</u> bool <b>uc_is_alpha</b><i> (ucs4_t <var>uc</var>)</i>
2631 <a name="IDX747"></a>
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.
2640 <dt><u>Function:</u> bool <b>uc_is_cntrl</b><i> (ucs4_t <var>uc</var>)</i>
2641 <a name="IDX748"></a>
2643 <dd><p>Tests for any control character.
2647 <dt><u>Function:</u> bool <b>uc_is_digit</b><i> (ucs4_t <var>uc</var>)</i>
2648 <a name="IDX749"></a>
2650 <dd><p>Tests for any character that corresponds to a decimal-digit character.
2654 <dt><u>Function:</u> bool <b>uc_is_graph</b><i> (ucs4_t <var>uc</var>)</i>
2655 <a name="IDX750"></a>
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.
2662 <dt><u>Function:</u> bool <b>uc_is_lower</b><i> (ucs4_t <var>uc</var>)</i>
2663 <a name="IDX751"></a>
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.
2671 <dt><u>Function:</u> bool <b>uc_is_print</b><i> (ucs4_t <var>uc</var>)</i>
2672 <a name="IDX752"></a>
2674 <dd><p>Tests for any printing character.
2678 <dt><u>Function:</u> bool <b>uc_is_punct</b><i> (ucs4_t <var>uc</var>)</i>
2679 <a name="IDX753"></a>
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.
2686 <dt><u>Function:</u> bool <b>uc_is_space</b><i> (ucs4_t <var>uc</var>)</i>
2687 <a name="IDX754"></a>
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>
2695 <dt><u>Function:</u> bool <b>uc_is_upper</b><i> (ucs4_t <var>uc</var>)</i>
2696 <a name="IDX755"></a>
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.
2704 <dt><u>Function:</u> bool <b>uc_is_xdigit</b><i> (ucs4_t <var>uc</var>)</i>
2705 <a name="IDX756"></a>
2707 <dd><p>Tests for any character that corresponds to a hexadecimal-digit character.
2711 <dt><u>Function:</u> bool <b>uc_is_blank</b><i> (ucs4_t <var>uc</var>)</i>
2712 <a name="IDX757"></a>
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.
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"> << </a>]</td>
2720 <td valign="middle" align="left">[<a href="libunistring_9.html#SEC53" title="Next chapter"> >> </a>]</td>
2721 <td valign="middle" align="left"> </td>
2722 <td valign="middle" align="left"> </td>
2723 <td valign="middle" align="left"> </td>
2724 <td valign="middle" align="left"> </td>
2725 <td valign="middle" align="left"> </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>
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>.