• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 **********************************************************************
5 *   Copyright (C) 1997-2016, International Business Machines
6 *   Corporation and others.  All Rights Reserved.
7 **********************************************************************
8 *
9 * File UCHAR.H
10 *
11 * Modification History:
12 *
13 *   Date        Name        Description
14 *   04/02/97    aliu        Creation.
15 *   03/29/99    helena      Updated for C APIs.
16 *   4/15/99     Madhu       Updated for C Implementation and Javadoc
17 *   5/20/99     Madhu       Added the function u_getVersion()
18 *   8/19/1999   srl         Upgraded scripts to Unicode 3.0
19 *   8/27/1999   schererm    UCharDirection constants: U_...
20 *   11/11/1999  weiv        added u_isalnum(), cleaned comments
21 *   01/11/2000  helena      Renamed u_getVersion to u_getUnicodeVersion().
22 ******************************************************************************
23 */
24 
25 #ifndef UCHAR_H
26 #define UCHAR_H
27 
28 #include "unicode/utypes.h"
29 
30 U_CDECL_BEGIN
31 
32 /*==========================================================================*/
33 /* Unicode version number                                                   */
34 /*==========================================================================*/
35 /**
36  * Unicode version number, default for the current ICU version.
37  * The actual Unicode Character Database (UCD) data is stored in uprops.dat
38  * and may be generated from UCD files from a different Unicode version.
39  * Call u_getUnicodeVersion to get the actual Unicode version of the data.
40  *
41  * @see u_getUnicodeVersion
42  * @stable ICU 2.0
43  */
44 #define U_UNICODE_VERSION "9.0"
45 
46 /**
47  * \file
48  * \brief C API: Unicode Properties
49  *
50  * This C API provides low-level access to the Unicode Character Database.
51  * In addition to raw property values, some convenience functions calculate
52  * derived properties, for example for Java-style programming.
53  *
54  * Unicode assigns each code point (not just assigned character) values for
55  * many properties.
56  * Most of them are simple boolean flags, or constants from a small enumerated list.
57  * For some properties, values are strings or other relatively more complex types.
58  *
59  * For more information see
60  * "About the Unicode Character Database" (http://www.unicode.org/ucd/)
61  * and the ICU User Guide chapter on Properties (http://icu-project.org/userguide/properties.html).
62  *
63  * Many functions are designed to match java.lang.Character functions.
64  * See the individual function documentation,
65  * and see the JDK 1.4 java.lang.Character documentation
66  * at http://java.sun.com/j2se/1.4/docs/api/java/lang/Character.html
67  *
68  * There are also functions that provide easy migration from C/POSIX functions
69  * like isblank(). Their use is generally discouraged because the C/POSIX
70  * standards do not define their semantics beyond the ASCII range, which means
71  * that different implementations exhibit very different behavior.
72  * Instead, Unicode properties should be used directly.
73  *
74  * There are also only a few, broad C/POSIX character classes, and they tend
75  * to be used for conflicting purposes. For example, the "isalpha()" class
76  * is sometimes used to determine word boundaries, while a more sophisticated
77  * approach would at least distinguish initial letters from continuation
78  * characters (the latter including combining marks).
79  * (In ICU, BreakIterator is the most sophisticated API for word boundaries.)
80  * Another example: There is no "istitle()" class for titlecase characters.
81  *
82  * ICU 3.4 and later provides API access for all twelve C/POSIX character classes.
83  * ICU implements them according to the Standard Recommendations in
84  * Annex C: Compatibility Properties of UTS #18 Unicode Regular Expressions
85  * (http://www.unicode.org/reports/tr18/#Compatibility_Properties).
86  *
87  * API access for C/POSIX character classes is as follows:
88  * - alpha:     u_isUAlphabetic(c) or u_hasBinaryProperty(c, UCHAR_ALPHABETIC)
89  * - lower:     u_isULowercase(c) or u_hasBinaryProperty(c, UCHAR_LOWERCASE)
90  * - upper:     u_isUUppercase(c) or u_hasBinaryProperty(c, UCHAR_UPPERCASE)
91  * - punct:     u_ispunct(c)
92  * - digit:     u_isdigit(c) or u_charType(c)==U_DECIMAL_DIGIT_NUMBER
93  * - xdigit:    u_isxdigit(c) or u_hasBinaryProperty(c, UCHAR_POSIX_XDIGIT)
94  * - alnum:     u_hasBinaryProperty(c, UCHAR_POSIX_ALNUM)
95  * - space:     u_isUWhiteSpace(c) or u_hasBinaryProperty(c, UCHAR_WHITE_SPACE)
96  * - blank:     u_isblank(c) or u_hasBinaryProperty(c, UCHAR_POSIX_BLANK)
97  * - cntrl:     u_charType(c)==U_CONTROL_CHAR
98  * - graph:     u_hasBinaryProperty(c, UCHAR_POSIX_GRAPH)
99  * - print:     u_hasBinaryProperty(c, UCHAR_POSIX_PRINT)
100  *
101  * Note: Some of the u_isxyz() functions in uchar.h predate, and do not match,
102  * the Standard Recommendations in UTS #18. Instead, they match Java
103  * functions according to their API documentation.
104  *
105  * \htmlonly
106  * The C/POSIX character classes are also available in UnicodeSet patterns,
107  * using patterns like [:graph:] or \p{graph}.
108  * \endhtmlonly
109  *
110  * Note: There are several ICU whitespace functions.
111  * Comparison:
112  * - u_isUWhiteSpace=UCHAR_WHITE_SPACE: Unicode White_Space property;
113  *       most of general categories "Z" (separators) + most whitespace ISO controls
114  *       (including no-break spaces, but excluding IS1..IS4 and ZWSP)
115  * - u_isWhitespace: Java isWhitespace; Z + whitespace ISO controls but excluding no-break spaces
116  * - u_isJavaSpaceChar: Java isSpaceChar; just Z (including no-break spaces)
117  * - u_isspace: Z + whitespace ISO controls (including no-break spaces)
118  * - u_isblank: "horizontal spaces" = TAB + Zs - ZWSP
119  */
120 
121 /**
122  * Constants.
123  */
124 
125 /** The lowest Unicode code point value. Code points are non-negative. @stable ICU 2.0 */
126 #define UCHAR_MIN_VALUE 0
127 
128 /**
129  * The highest Unicode code point value (scalar value) according to
130  * The Unicode Standard. This is a 21-bit value (20.1 bits, rounded up).
131  * For a single character, UChar32 is a simple type that can hold any code point value.
132  *
133  * @see UChar32
134  * @stable ICU 2.0
135  */
136 #define UCHAR_MAX_VALUE 0x10ffff
137 
138 /**
139  * Get a single-bit bit set (a flag) from a bit number 0..31.
140  * @stable ICU 2.1
141  */
142 #define U_MASK(x) ((uint32_t)1<<(x))
143 
144 /**
145  * Selection constants for Unicode properties.
146  * These constants are used in functions like u_hasBinaryProperty to select
147  * one of the Unicode properties.
148  *
149  * The properties APIs are intended to reflect Unicode properties as defined
150  * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR).
151  * For details about the properties see http://www.unicode.org/ucd/ .
152  * For names of Unicode properties see the UCD file PropertyAliases.txt.
153  *
154  * Important: If ICU is built with UCD files from Unicode versions below, e.g., 3.2,
155  * then properties marked with "new in Unicode 3.2" are not or not fully available.
156  * Check u_getUnicodeVersion to be sure.
157  *
158  * @see u_hasBinaryProperty
159  * @see u_getIntPropertyValue
160  * @see u_getUnicodeVersion
161  * @stable ICU 2.1
162  */
163 typedef enum UProperty {
164     /*
165      * Note: UProperty constants are parsed by preparseucd.py.
166      * It matches lines like
167      *     UCHAR_<Unicode property name>=<integer>,
168      */
169 
170     /*  Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that
171     debuggers display UCHAR_ALPHABETIC as the symbolic name for 0,
172     rather than UCHAR_BINARY_START.  Likewise for other *_START
173     identifiers. */
174 
175     /** Binary property Alphabetic. Same as u_isUAlphabetic, different from u_isalpha.
176         Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic @stable ICU 2.1 */
177     UCHAR_ALPHABETIC=0,
178     /** First constant for binary Unicode properties. @stable ICU 2.1 */
179     UCHAR_BINARY_START=UCHAR_ALPHABETIC,
180     /** Binary property ASCII_Hex_Digit. 0-9 A-F a-f @stable ICU 2.1 */
181     UCHAR_ASCII_HEX_DIGIT=1,
182     /** Binary property Bidi_Control.
183         Format controls which have specific functions
184         in the Bidi Algorithm. @stable ICU 2.1 */
185     UCHAR_BIDI_CONTROL=2,
186     /** Binary property Bidi_Mirrored.
187         Characters that may change display in RTL text.
188         Same as u_isMirrored.
189         See Bidi Algorithm, UTR 9. @stable ICU 2.1 */
190     UCHAR_BIDI_MIRRORED=3,
191     /** Binary property Dash. Variations of dashes. @stable ICU 2.1 */
192     UCHAR_DASH=4,
193     /** Binary property Default_Ignorable_Code_Point (new in Unicode 3.2).
194         Ignorable in most processing.
195         <2060..206F, FFF0..FFFB, E0000..E0FFF>+Other_Default_Ignorable_Code_Point+(Cf+Cc+Cs-White_Space) @stable ICU 2.1 */
196     UCHAR_DEFAULT_IGNORABLE_CODE_POINT=5,
197     /** Binary property Deprecated (new in Unicode 3.2).
198         The usage of deprecated characters is strongly discouraged. @stable ICU 2.1 */
199     UCHAR_DEPRECATED=6,
200     /** Binary property Diacritic. Characters that linguistically modify
201         the meaning of another character to which they apply. @stable ICU 2.1 */
202     UCHAR_DIACRITIC=7,
203     /** Binary property Extender.
204         Extend the value or shape of a preceding alphabetic character,
205         e.g., length and iteration marks. @stable ICU 2.1 */
206     UCHAR_EXTENDER=8,
207     /** Binary property Full_Composition_Exclusion.
208         CompositionExclusions.txt+Singleton Decompositions+
209         Non-Starter Decompositions. @stable ICU 2.1 */
210     UCHAR_FULL_COMPOSITION_EXCLUSION=9,
211     /** Binary property Grapheme_Base (new in Unicode 3.2).
212         For programmatic determination of grapheme cluster boundaries.
213         [0..10FFFF]-Cc-Cf-Cs-Co-Cn-Zl-Zp-Grapheme_Link-Grapheme_Extend-CGJ @stable ICU 2.1 */
214     UCHAR_GRAPHEME_BASE=10,
215     /** Binary property Grapheme_Extend (new in Unicode 3.2).
216         For programmatic determination of grapheme cluster boundaries.
217         Me+Mn+Mc+Other_Grapheme_Extend-Grapheme_Link-CGJ @stable ICU 2.1 */
218     UCHAR_GRAPHEME_EXTEND=11,
219     /** Binary property Grapheme_Link (new in Unicode 3.2).
220         For programmatic determination of grapheme cluster boundaries. @stable ICU 2.1 */
221     UCHAR_GRAPHEME_LINK=12,
222     /** Binary property Hex_Digit.
223         Characters commonly used for hexadecimal numbers. @stable ICU 2.1 */
224     UCHAR_HEX_DIGIT=13,
225     /** Binary property Hyphen. Dashes used to mark connections
226         between pieces of words, plus the Katakana middle dot. @stable ICU 2.1 */
227     UCHAR_HYPHEN=14,
228     /** Binary property ID_Continue.
229         Characters that can continue an identifier.
230         DerivedCoreProperties.txt also says "NOTE: Cf characters should be filtered out."
231         ID_Start+Mn+Mc+Nd+Pc @stable ICU 2.1 */
232     UCHAR_ID_CONTINUE=15,
233     /** Binary property ID_Start.
234         Characters that can start an identifier.
235         Lu+Ll+Lt+Lm+Lo+Nl @stable ICU 2.1 */
236     UCHAR_ID_START=16,
237     /** Binary property Ideographic.
238         CJKV ideographs. @stable ICU 2.1 */
239     UCHAR_IDEOGRAPHIC=17,
240     /** Binary property IDS_Binary_Operator (new in Unicode 3.2).
241         For programmatic determination of
242         Ideographic Description Sequences. @stable ICU 2.1 */
243     UCHAR_IDS_BINARY_OPERATOR=18,
244     /** Binary property IDS_Trinary_Operator (new in Unicode 3.2).
245         For programmatic determination of
246         Ideographic Description Sequences. @stable ICU 2.1 */
247     UCHAR_IDS_TRINARY_OPERATOR=19,
248     /** Binary property Join_Control.
249         Format controls for cursive joining and ligation. @stable ICU 2.1 */
250     UCHAR_JOIN_CONTROL=20,
251     /** Binary property Logical_Order_Exception (new in Unicode 3.2).
252         Characters that do not use logical order and
253         require special handling in most processing. @stable ICU 2.1 */
254     UCHAR_LOGICAL_ORDER_EXCEPTION=21,
255     /** Binary property Lowercase. Same as u_isULowercase, different from u_islower.
256         Ll+Other_Lowercase @stable ICU 2.1 */
257     UCHAR_LOWERCASE=22,
258     /** Binary property Math. Sm+Other_Math @stable ICU 2.1 */
259     UCHAR_MATH=23,
260     /** Binary property Noncharacter_Code_Point.
261         Code points that are explicitly defined as illegal
262         for the encoding of characters. @stable ICU 2.1 */
263     UCHAR_NONCHARACTER_CODE_POINT=24,
264     /** Binary property Quotation_Mark. @stable ICU 2.1 */
265     UCHAR_QUOTATION_MARK=25,
266     /** Binary property Radical (new in Unicode 3.2).
267         For programmatic determination of
268         Ideographic Description Sequences. @stable ICU 2.1 */
269     UCHAR_RADICAL=26,
270     /** Binary property Soft_Dotted (new in Unicode 3.2).
271         Characters with a "soft dot", like i or j.
272         An accent placed on these characters causes
273         the dot to disappear. @stable ICU 2.1 */
274     UCHAR_SOFT_DOTTED=27,
275     /** Binary property Terminal_Punctuation.
276         Punctuation characters that generally mark
277         the end of textual units. @stable ICU 2.1 */
278     UCHAR_TERMINAL_PUNCTUATION=28,
279     /** Binary property Unified_Ideograph (new in Unicode 3.2).
280         For programmatic determination of
281         Ideographic Description Sequences. @stable ICU 2.1 */
282     UCHAR_UNIFIED_IDEOGRAPH=29,
283     /** Binary property Uppercase. Same as u_isUUppercase, different from u_isupper.
284         Lu+Other_Uppercase @stable ICU 2.1 */
285     UCHAR_UPPERCASE=30,
286     /** Binary property White_Space.
287         Same as u_isUWhiteSpace, different from u_isspace and u_isWhitespace.
288         Space characters+TAB+CR+LF-ZWSP-ZWNBSP @stable ICU 2.1 */
289     UCHAR_WHITE_SPACE=31,
290     /** Binary property XID_Continue.
291         ID_Continue modified to allow closure under
292         normalization forms NFKC and NFKD. @stable ICU 2.1 */
293     UCHAR_XID_CONTINUE=32,
294     /** Binary property XID_Start. ID_Start modified to allow
295         closure under normalization forms NFKC and NFKD. @stable ICU 2.1 */
296     UCHAR_XID_START=33,
297     /** Binary property Case_Sensitive. Either the source of a case
298         mapping or _in_ the target of a case mapping. Not the same as
299         the general category Cased_Letter. @stable ICU 2.6 */
300    UCHAR_CASE_SENSITIVE=34,
301     /** Binary property STerm (new in Unicode 4.0.1).
302         Sentence Terminal. Used in UAX #29: Text Boundaries
303         (http://www.unicode.org/reports/tr29/)
304         @stable ICU 3.0 */
305     UCHAR_S_TERM=35,
306     /** Binary property Variation_Selector (new in Unicode 4.0.1).
307         Indicates all those characters that qualify as Variation Selectors.
308         For details on the behavior of these characters,
309         see StandardizedVariants.html and 15.6 Variation Selectors.
310         @stable ICU 3.0 */
311     UCHAR_VARIATION_SELECTOR=36,
312     /** Binary property NFD_Inert.
313         ICU-specific property for characters that are inert under NFD,
314         i.e., they do not interact with adjacent characters.
315         See the documentation for the Normalizer2 class and the
316         Normalizer2::isInert() method.
317         @stable ICU 3.0 */
318     UCHAR_NFD_INERT=37,
319     /** Binary property NFKD_Inert.
320         ICU-specific property for characters that are inert under NFKD,
321         i.e., they do not interact with adjacent characters.
322         See the documentation for the Normalizer2 class and the
323         Normalizer2::isInert() method.
324         @stable ICU 3.0 */
325     UCHAR_NFKD_INERT=38,
326     /** Binary property NFC_Inert.
327         ICU-specific property for characters that are inert under NFC,
328         i.e., they do not interact with adjacent characters.
329         See the documentation for the Normalizer2 class and the
330         Normalizer2::isInert() method.
331         @stable ICU 3.0 */
332     UCHAR_NFC_INERT=39,
333     /** Binary property NFKC_Inert.
334         ICU-specific property for characters that are inert under NFKC,
335         i.e., they do not interact with adjacent characters.
336         See the documentation for the Normalizer2 class and the
337         Normalizer2::isInert() method.
338         @stable ICU 3.0 */
339     UCHAR_NFKC_INERT=40,
340     /** Binary Property Segment_Starter.
341         ICU-specific property for characters that are starters in terms of
342         Unicode normalization and combining character sequences.
343         They have ccc=0 and do not occur in non-initial position of the
344         canonical decomposition of any character
345         (like a-umlaut in NFD and a Jamo T in an NFD(Hangul LVT)).
346         ICU uses this property for segmenting a string for generating a set of
347         canonically equivalent strings, e.g. for canonical closure while
348         processing collation tailoring rules.
349         @stable ICU 3.0 */
350     UCHAR_SEGMENT_STARTER=41,
351     /** Binary property Pattern_Syntax (new in Unicode 4.1).
352         See UAX #31 Identifier and Pattern Syntax
353         (http://www.unicode.org/reports/tr31/)
354         @stable ICU 3.4 */
355     UCHAR_PATTERN_SYNTAX=42,
356     /** Binary property Pattern_White_Space (new in Unicode 4.1).
357         See UAX #31 Identifier and Pattern Syntax
358         (http://www.unicode.org/reports/tr31/)
359         @stable ICU 3.4 */
360     UCHAR_PATTERN_WHITE_SPACE=43,
361     /** Binary property alnum (a C/POSIX character class).
362         Implemented according to the UTS #18 Annex C Standard Recommendation.
363         See the uchar.h file documentation.
364         @stable ICU 3.4 */
365     UCHAR_POSIX_ALNUM=44,
366     /** Binary property blank (a C/POSIX character class).
367         Implemented according to the UTS #18 Annex C Standard Recommendation.
368         See the uchar.h file documentation.
369         @stable ICU 3.4 */
370     UCHAR_POSIX_BLANK=45,
371     /** Binary property graph (a C/POSIX character class).
372         Implemented according to the UTS #18 Annex C Standard Recommendation.
373         See the uchar.h file documentation.
374         @stable ICU 3.4 */
375     UCHAR_POSIX_GRAPH=46,
376     /** Binary property print (a C/POSIX character class).
377         Implemented according to the UTS #18 Annex C Standard Recommendation.
378         See the uchar.h file documentation.
379         @stable ICU 3.4 */
380     UCHAR_POSIX_PRINT=47,
381     /** Binary property xdigit (a C/POSIX character class).
382         Implemented according to the UTS #18 Annex C Standard Recommendation.
383         See the uchar.h file documentation.
384         @stable ICU 3.4 */
385     UCHAR_POSIX_XDIGIT=48,
386     /** Binary property Cased. For Lowercase, Uppercase and Titlecase characters. @stable ICU 4.4 */
387     UCHAR_CASED=49,
388     /** Binary property Case_Ignorable. Used in context-sensitive case mappings. @stable ICU 4.4 */
389     UCHAR_CASE_IGNORABLE=50,
390     /** Binary property Changes_When_Lowercased. @stable ICU 4.4 */
391     UCHAR_CHANGES_WHEN_LOWERCASED=51,
392     /** Binary property Changes_When_Uppercased. @stable ICU 4.4 */
393     UCHAR_CHANGES_WHEN_UPPERCASED=52,
394     /** Binary property Changes_When_Titlecased. @stable ICU 4.4 */
395     UCHAR_CHANGES_WHEN_TITLECASED=53,
396     /** Binary property Changes_When_Casefolded. @stable ICU 4.4 */
397     UCHAR_CHANGES_WHEN_CASEFOLDED=54,
398     /** Binary property Changes_When_Casemapped. @stable ICU 4.4 */
399     UCHAR_CHANGES_WHEN_CASEMAPPED=55,
400     /** Binary property Changes_When_NFKC_Casefolded. @stable ICU 4.4 */
401     UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED=56,
402 #ifndef U_HIDE_DRAFT_API
403     /**
404      * Binary property Emoji.
405      * See http://www.unicode.org/reports/tr51/#Emoji_Properties
406      *
407      * @draft ICU 57
408      */
409     UCHAR_EMOJI=57,
410     /**
411      * Binary property Emoji_Presentation.
412      * See http://www.unicode.org/reports/tr51/#Emoji_Properties
413      *
414      * @draft ICU 57
415      */
416     UCHAR_EMOJI_PRESENTATION=58,
417     /**
418      * Binary property Emoji_Modifier.
419      * See http://www.unicode.org/reports/tr51/#Emoji_Properties
420      *
421      * @draft ICU 57
422      */
423     UCHAR_EMOJI_MODIFIER=59,
424     /**
425      * Binary property Emoji_Modifier_Base.
426      * See http://www.unicode.org/reports/tr51/#Emoji_Properties
427      *
428      * @draft ICU 57
429      */
430     UCHAR_EMOJI_MODIFIER_BASE=60,
431 #endif /* U_HIDE_DRAFT_API */
432 #ifndef U_HIDE_DEPRECATED_API
433     /**
434      * One more than the last constant for binary Unicode properties.
435      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
436      */
437     UCHAR_BINARY_LIMIT=61,
438 #endif  // U_HIDE_DEPRECATED_API
439 
440     /** Enumerated property Bidi_Class.
441         Same as u_charDirection, returns UCharDirection values. @stable ICU 2.2 */
442     UCHAR_BIDI_CLASS=0x1000,
443     /** First constant for enumerated/integer Unicode properties. @stable ICU 2.2 */
444     UCHAR_INT_START=UCHAR_BIDI_CLASS,
445     /** Enumerated property Block.
446         Same as ublock_getCode, returns UBlockCode values. @stable ICU 2.2 */
447     UCHAR_BLOCK=0x1001,
448     /** Enumerated property Canonical_Combining_Class.
449         Same as u_getCombiningClass, returns 8-bit numeric values. @stable ICU 2.2 */
450     UCHAR_CANONICAL_COMBINING_CLASS=0x1002,
451     /** Enumerated property Decomposition_Type.
452         Returns UDecompositionType values. @stable ICU 2.2 */
453     UCHAR_DECOMPOSITION_TYPE=0x1003,
454     /** Enumerated property East_Asian_Width.
455         See http://www.unicode.org/reports/tr11/
456         Returns UEastAsianWidth values. @stable ICU 2.2 */
457     UCHAR_EAST_ASIAN_WIDTH=0x1004,
458     /** Enumerated property General_Category.
459         Same as u_charType, returns UCharCategory values. @stable ICU 2.2 */
460     UCHAR_GENERAL_CATEGORY=0x1005,
461     /** Enumerated property Joining_Group.
462         Returns UJoiningGroup values. @stable ICU 2.2 */
463     UCHAR_JOINING_GROUP=0x1006,
464     /** Enumerated property Joining_Type.
465         Returns UJoiningType values. @stable ICU 2.2 */
466     UCHAR_JOINING_TYPE=0x1007,
467     /** Enumerated property Line_Break.
468         Returns ULineBreak values. @stable ICU 2.2 */
469     UCHAR_LINE_BREAK=0x1008,
470     /** Enumerated property Numeric_Type.
471         Returns UNumericType values. @stable ICU 2.2 */
472     UCHAR_NUMERIC_TYPE=0x1009,
473     /** Enumerated property Script.
474         Same as uscript_getScript, returns UScriptCode values. @stable ICU 2.2 */
475     UCHAR_SCRIPT=0x100A,
476     /** Enumerated property Hangul_Syllable_Type, new in Unicode 4.
477         Returns UHangulSyllableType values. @stable ICU 2.6 */
478     UCHAR_HANGUL_SYLLABLE_TYPE=0x100B,
479     /** Enumerated property NFD_Quick_Check.
480         Returns UNormalizationCheckResult values. @stable ICU 3.0 */
481     UCHAR_NFD_QUICK_CHECK=0x100C,
482     /** Enumerated property NFKD_Quick_Check.
483         Returns UNormalizationCheckResult values. @stable ICU 3.0 */
484     UCHAR_NFKD_QUICK_CHECK=0x100D,
485     /** Enumerated property NFC_Quick_Check.
486         Returns UNormalizationCheckResult values. @stable ICU 3.0 */
487     UCHAR_NFC_QUICK_CHECK=0x100E,
488     /** Enumerated property NFKC_Quick_Check.
489         Returns UNormalizationCheckResult values. @stable ICU 3.0 */
490     UCHAR_NFKC_QUICK_CHECK=0x100F,
491     /** Enumerated property Lead_Canonical_Combining_Class.
492         ICU-specific property for the ccc of the first code point
493         of the decomposition, or lccc(c)=ccc(NFD(c)[0]).
494         Useful for checking for canonically ordered text;
495         see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD .
496         Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */
497     UCHAR_LEAD_CANONICAL_COMBINING_CLASS=0x1010,
498     /** Enumerated property Trail_Canonical_Combining_Class.
499         ICU-specific property for the ccc of the last code point
500         of the decomposition, or tccc(c)=ccc(NFD(c)[last]).
501         Useful for checking for canonically ordered text;
502         see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD .
503         Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */
504     UCHAR_TRAIL_CANONICAL_COMBINING_CLASS=0x1011,
505     /** Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1).
506         Used in UAX #29: Text Boundaries
507         (http://www.unicode.org/reports/tr29/)
508         Returns UGraphemeClusterBreak values. @stable ICU 3.4 */
509     UCHAR_GRAPHEME_CLUSTER_BREAK=0x1012,
510     /** Enumerated property Sentence_Break (new in Unicode 4.1).
511         Used in UAX #29: Text Boundaries
512         (http://www.unicode.org/reports/tr29/)
513         Returns USentenceBreak values. @stable ICU 3.4 */
514     UCHAR_SENTENCE_BREAK=0x1013,
515     /** Enumerated property Word_Break (new in Unicode 4.1).
516         Used in UAX #29: Text Boundaries
517         (http://www.unicode.org/reports/tr29/)
518         Returns UWordBreakValues values. @stable ICU 3.4 */
519     UCHAR_WORD_BREAK=0x1014,
520     /** Enumerated property Bidi_Paired_Bracket_Type (new in Unicode 6.3).
521         Used in UAX #9: Unicode Bidirectional Algorithm
522         (http://www.unicode.org/reports/tr9/)
523         Returns UBidiPairedBracketType values. @stable ICU 52 */
524     UCHAR_BIDI_PAIRED_BRACKET_TYPE=0x1015,
525 #ifndef U_HIDE_DEPRECATED_API
526     /**
527      * One more than the last constant for enumerated/integer Unicode properties.
528      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
529      */
530     UCHAR_INT_LIMIT=0x1016,
531 #endif  // U_HIDE_DEPRECATED_API
532 
533     /** Bitmask property General_Category_Mask.
534         This is the General_Category property returned as a bit mask.
535         When used in u_getIntPropertyValue(c), same as U_MASK(u_charType(c)),
536         returns bit masks for UCharCategory values where exactly one bit is set.
537         When used with u_getPropertyValueName() and u_getPropertyValueEnum(),
538         a multi-bit mask is used for sets of categories like "Letters".
539         Mask values should be cast to uint32_t.
540         @stable ICU 2.4 */
541     UCHAR_GENERAL_CATEGORY_MASK=0x2000,
542     /** First constant for bit-mask Unicode properties. @stable ICU 2.4 */
543     UCHAR_MASK_START=UCHAR_GENERAL_CATEGORY_MASK,
544 #ifndef U_HIDE_DEPRECATED_API
545     /**
546      * One more than the last constant for bit-mask Unicode properties.
547      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
548      */
549     UCHAR_MASK_LIMIT=0x2001,
550 #endif  // U_HIDE_DEPRECATED_API
551 
552     /** Double property Numeric_Value.
553         Corresponds to u_getNumericValue. @stable ICU 2.4 */
554     UCHAR_NUMERIC_VALUE=0x3000,
555     /** First constant for double Unicode properties. @stable ICU 2.4 */
556     UCHAR_DOUBLE_START=UCHAR_NUMERIC_VALUE,
557 #ifndef U_HIDE_DEPRECATED_API
558     /**
559      * One more than the last constant for double Unicode properties.
560      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
561      */
562     UCHAR_DOUBLE_LIMIT=0x3001,
563 #endif  // U_HIDE_DEPRECATED_API
564 
565     /** String property Age.
566         Corresponds to u_charAge. @stable ICU 2.4 */
567     UCHAR_AGE=0x4000,
568     /** First constant for string Unicode properties. @stable ICU 2.4 */
569     UCHAR_STRING_START=UCHAR_AGE,
570     /** String property Bidi_Mirroring_Glyph.
571         Corresponds to u_charMirror. @stable ICU 2.4 */
572     UCHAR_BIDI_MIRRORING_GLYPH=0x4001,
573     /** String property Case_Folding.
574         Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */
575     UCHAR_CASE_FOLDING=0x4002,
576 #ifndef U_HIDE_DEPRECATED_API
577     /** Deprecated string property ISO_Comment.
578         Corresponds to u_getISOComment. @deprecated ICU 49 */
579     UCHAR_ISO_COMMENT=0x4003,
580 #endif  /* U_HIDE_DEPRECATED_API */
581     /** String property Lowercase_Mapping.
582         Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */
583     UCHAR_LOWERCASE_MAPPING=0x4004,
584     /** String property Name.
585         Corresponds to u_charName. @stable ICU 2.4 */
586     UCHAR_NAME=0x4005,
587     /** String property Simple_Case_Folding.
588         Corresponds to u_foldCase. @stable ICU 2.4 */
589     UCHAR_SIMPLE_CASE_FOLDING=0x4006,
590     /** String property Simple_Lowercase_Mapping.
591         Corresponds to u_tolower. @stable ICU 2.4 */
592     UCHAR_SIMPLE_LOWERCASE_MAPPING=0x4007,
593     /** String property Simple_Titlecase_Mapping.
594         Corresponds to u_totitle. @stable ICU 2.4 */
595     UCHAR_SIMPLE_TITLECASE_MAPPING=0x4008,
596     /** String property Simple_Uppercase_Mapping.
597         Corresponds to u_toupper. @stable ICU 2.4 */
598     UCHAR_SIMPLE_UPPERCASE_MAPPING=0x4009,
599     /** String property Titlecase_Mapping.
600         Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */
601     UCHAR_TITLECASE_MAPPING=0x400A,
602 #ifndef U_HIDE_DEPRECATED_API
603     /** String property Unicode_1_Name.
604         This property is of little practical value.
605         Beginning with ICU 49, ICU APIs return an empty string for this property.
606         Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU 49 */
607     UCHAR_UNICODE_1_NAME=0x400B,
608 #endif  /* U_HIDE_DEPRECATED_API */
609     /** String property Uppercase_Mapping.
610         Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */
611     UCHAR_UPPERCASE_MAPPING=0x400C,
612     /** String property Bidi_Paired_Bracket (new in Unicode 6.3).
613         Corresponds to u_getBidiPairedBracket. @stable ICU 52 */
614     UCHAR_BIDI_PAIRED_BRACKET=0x400D,
615 #ifndef U_HIDE_DEPRECATED_API
616     /**
617      * One more than the last constant for string Unicode properties.
618      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
619      */
620     UCHAR_STRING_LIMIT=0x400E,
621 #endif  // U_HIDE_DEPRECATED_API
622 
623     /** Miscellaneous property Script_Extensions (new in Unicode 6.0).
624         Some characters are commonly used in multiple scripts.
625         For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
626         Corresponds to uscript_hasScript and uscript_getScriptExtensions in uscript.h.
627         @stable ICU 4.6 */
628     UCHAR_SCRIPT_EXTENSIONS=0x7000,
629     /** First constant for Unicode properties with unusual value types. @stable ICU 4.6 */
630     UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS,
631 #ifndef U_HIDE_DEPRECATED_API
632     /**
633      * One more than the last constant for Unicode properties with unusual value types.
634      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
635      */
636     UCHAR_OTHER_PROPERTY_LIMIT=0x7001,
637 #endif  // U_HIDE_DEPRECATED_API
638 
639     /** Represents a nonexistent or invalid property or property value. @stable ICU 2.4 */
640     UCHAR_INVALID_CODE = -1
641 } UProperty;
642 
643 /**
644  * Data for enumerated Unicode general category types.
645  * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html .
646  * @stable ICU 2.0
647  */
648 typedef enum UCharCategory
649 {
650     /*
651      * Note: UCharCategory constants and their API comments are parsed by preparseucd.py.
652      * It matches pairs of lines like
653      *     / ** <Unicode 2-letter General_Category value> comment... * /
654      *     U_<[A-Z_]+> = <integer>,
655      */
656 
657     /** Non-category for unassigned and non-character code points. @stable ICU 2.0 */
658     U_UNASSIGNED              = 0,
659     /** Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as U_UNASSIGNED!) @stable ICU 2.0 */
660     U_GENERAL_OTHER_TYPES     = 0,
661     /** Lu @stable ICU 2.0 */
662     U_UPPERCASE_LETTER        = 1,
663     /** Ll @stable ICU 2.0 */
664     U_LOWERCASE_LETTER        = 2,
665     /** Lt @stable ICU 2.0 */
666     U_TITLECASE_LETTER        = 3,
667     /** Lm @stable ICU 2.0 */
668     U_MODIFIER_LETTER         = 4,
669     /** Lo @stable ICU 2.0 */
670     U_OTHER_LETTER            = 5,
671     /** Mn @stable ICU 2.0 */
672     U_NON_SPACING_MARK        = 6,
673     /** Me @stable ICU 2.0 */
674     U_ENCLOSING_MARK          = 7,
675     /** Mc @stable ICU 2.0 */
676     U_COMBINING_SPACING_MARK  = 8,
677     /** Nd @stable ICU 2.0 */
678     U_DECIMAL_DIGIT_NUMBER    = 9,
679     /** Nl @stable ICU 2.0 */
680     U_LETTER_NUMBER           = 10,
681     /** No @stable ICU 2.0 */
682     U_OTHER_NUMBER            = 11,
683     /** Zs @stable ICU 2.0 */
684     U_SPACE_SEPARATOR         = 12,
685     /** Zl @stable ICU 2.0 */
686     U_LINE_SEPARATOR          = 13,
687     /** Zp @stable ICU 2.0 */
688     U_PARAGRAPH_SEPARATOR     = 14,
689     /** Cc @stable ICU 2.0 */
690     U_CONTROL_CHAR            = 15,
691     /** Cf @stable ICU 2.0 */
692     U_FORMAT_CHAR             = 16,
693     /** Co @stable ICU 2.0 */
694     U_PRIVATE_USE_CHAR        = 17,
695     /** Cs @stable ICU 2.0 */
696     U_SURROGATE               = 18,
697     /** Pd @stable ICU 2.0 */
698     U_DASH_PUNCTUATION        = 19,
699     /** Ps @stable ICU 2.0 */
700     U_START_PUNCTUATION       = 20,
701     /** Pe @stable ICU 2.0 */
702     U_END_PUNCTUATION         = 21,
703     /** Pc @stable ICU 2.0 */
704     U_CONNECTOR_PUNCTUATION   = 22,
705     /** Po @stable ICU 2.0 */
706     U_OTHER_PUNCTUATION       = 23,
707     /** Sm @stable ICU 2.0 */
708     U_MATH_SYMBOL             = 24,
709     /** Sc @stable ICU 2.0 */
710     U_CURRENCY_SYMBOL         = 25,
711     /** Sk @stable ICU 2.0 */
712     U_MODIFIER_SYMBOL         = 26,
713     /** So @stable ICU 2.0 */
714     U_OTHER_SYMBOL            = 27,
715     /** Pi @stable ICU 2.0 */
716     U_INITIAL_PUNCTUATION     = 28,
717     /** Pf @stable ICU 2.0 */
718     U_FINAL_PUNCTUATION       = 29,
719     /**
720      * One higher than the last enum UCharCategory constant.
721      * This numeric value is stable (will not change), see
722      * http://www.unicode.org/policies/stability_policy.html#Property_Value
723      *
724      * @stable ICU 2.0
725      */
726     U_CHAR_CATEGORY_COUNT
727 } UCharCategory;
728 
729 /**
730  * U_GC_XX_MASK constants are bit flags corresponding to Unicode
731  * general category values.
732  * For each category, the nth bit is set if the numeric value of the
733  * corresponding UCharCategory constant is n.
734  *
735  * There are also some U_GC_Y_MASK constants for groups of general categories
736  * like L for all letter categories.
737  *
738  * @see u_charType
739  * @see U_GET_GC_MASK
740  * @see UCharCategory
741  * @stable ICU 2.1
742  */
743 #define U_GC_CN_MASK    U_MASK(U_GENERAL_OTHER_TYPES)
744 
745 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
746 #define U_GC_LU_MASK    U_MASK(U_UPPERCASE_LETTER)
747 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
748 #define U_GC_LL_MASK    U_MASK(U_LOWERCASE_LETTER)
749 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
750 #define U_GC_LT_MASK    U_MASK(U_TITLECASE_LETTER)
751 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
752 #define U_GC_LM_MASK    U_MASK(U_MODIFIER_LETTER)
753 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
754 #define U_GC_LO_MASK    U_MASK(U_OTHER_LETTER)
755 
756 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
757 #define U_GC_MN_MASK    U_MASK(U_NON_SPACING_MARK)
758 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
759 #define U_GC_ME_MASK    U_MASK(U_ENCLOSING_MARK)
760 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
761 #define U_GC_MC_MASK    U_MASK(U_COMBINING_SPACING_MARK)
762 
763 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
764 #define U_GC_ND_MASK    U_MASK(U_DECIMAL_DIGIT_NUMBER)
765 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
766 #define U_GC_NL_MASK    U_MASK(U_LETTER_NUMBER)
767 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
768 #define U_GC_NO_MASK    U_MASK(U_OTHER_NUMBER)
769 
770 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
771 #define U_GC_ZS_MASK    U_MASK(U_SPACE_SEPARATOR)
772 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
773 #define U_GC_ZL_MASK    U_MASK(U_LINE_SEPARATOR)
774 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
775 #define U_GC_ZP_MASK    U_MASK(U_PARAGRAPH_SEPARATOR)
776 
777 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
778 #define U_GC_CC_MASK    U_MASK(U_CONTROL_CHAR)
779 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
780 #define U_GC_CF_MASK    U_MASK(U_FORMAT_CHAR)
781 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
782 #define U_GC_CO_MASK    U_MASK(U_PRIVATE_USE_CHAR)
783 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
784 #define U_GC_CS_MASK    U_MASK(U_SURROGATE)
785 
786 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
787 #define U_GC_PD_MASK    U_MASK(U_DASH_PUNCTUATION)
788 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
789 #define U_GC_PS_MASK    U_MASK(U_START_PUNCTUATION)
790 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
791 #define U_GC_PE_MASK    U_MASK(U_END_PUNCTUATION)
792 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
793 #define U_GC_PC_MASK    U_MASK(U_CONNECTOR_PUNCTUATION)
794 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
795 #define U_GC_PO_MASK    U_MASK(U_OTHER_PUNCTUATION)
796 
797 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
798 #define U_GC_SM_MASK    U_MASK(U_MATH_SYMBOL)
799 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
800 #define U_GC_SC_MASK    U_MASK(U_CURRENCY_SYMBOL)
801 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
802 #define U_GC_SK_MASK    U_MASK(U_MODIFIER_SYMBOL)
803 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
804 #define U_GC_SO_MASK    U_MASK(U_OTHER_SYMBOL)
805 
806 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
807 #define U_GC_PI_MASK    U_MASK(U_INITIAL_PUNCTUATION)
808 /** Mask constant for a UCharCategory. @stable ICU 2.1 */
809 #define U_GC_PF_MASK    U_MASK(U_FINAL_PUNCTUATION)
810 
811 
812 /** Mask constant for multiple UCharCategory bits (L Letters). @stable ICU 2.1 */
813 #define U_GC_L_MASK \
814             (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK|U_GC_LM_MASK|U_GC_LO_MASK)
815 
816 /** Mask constant for multiple UCharCategory bits (LC Cased Letters). @stable ICU 2.1 */
817 #define U_GC_LC_MASK \
818             (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK)
819 
820 /** Mask constant for multiple UCharCategory bits (M Marks). @stable ICU 2.1 */
821 #define U_GC_M_MASK (U_GC_MN_MASK|U_GC_ME_MASK|U_GC_MC_MASK)
822 
823 /** Mask constant for multiple UCharCategory bits (N Numbers). @stable ICU 2.1 */
824 #define U_GC_N_MASK (U_GC_ND_MASK|U_GC_NL_MASK|U_GC_NO_MASK)
825 
826 /** Mask constant for multiple UCharCategory bits (Z Separators). @stable ICU 2.1 */
827 #define U_GC_Z_MASK (U_GC_ZS_MASK|U_GC_ZL_MASK|U_GC_ZP_MASK)
828 
829 /** Mask constant for multiple UCharCategory bits (C Others). @stable ICU 2.1 */
830 #define U_GC_C_MASK \
831             (U_GC_CN_MASK|U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CO_MASK|U_GC_CS_MASK)
832 
833 /** Mask constant for multiple UCharCategory bits (P Punctuation). @stable ICU 2.1 */
834 #define U_GC_P_MASK \
835             (U_GC_PD_MASK|U_GC_PS_MASK|U_GC_PE_MASK|U_GC_PC_MASK|U_GC_PO_MASK| \
836              U_GC_PI_MASK|U_GC_PF_MASK)
837 
838 /** Mask constant for multiple UCharCategory bits (S Symbols). @stable ICU 2.1 */
839 #define U_GC_S_MASK (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK)
840 
841 /**
842  * This specifies the language directional property of a character set.
843  * @stable ICU 2.0
844  */
845 typedef enum UCharDirection {
846     /*
847      * Note: UCharDirection constants and their API comments are parsed by preparseucd.py.
848      * It matches pairs of lines like
849      *     / ** <Unicode 1..3-letter Bidi_Class value> comment... * /
850      *     U_<[A-Z_]+> = <integer>,
851      */
852 
853     /** L @stable ICU 2.0 */
854     U_LEFT_TO_RIGHT               = 0,
855     /** R @stable ICU 2.0 */
856     U_RIGHT_TO_LEFT               = 1,
857     /** EN @stable ICU 2.0 */
858     U_EUROPEAN_NUMBER             = 2,
859     /** ES @stable ICU 2.0 */
860     U_EUROPEAN_NUMBER_SEPARATOR   = 3,
861     /** ET @stable ICU 2.0 */
862     U_EUROPEAN_NUMBER_TERMINATOR  = 4,
863     /** AN @stable ICU 2.0 */
864     U_ARABIC_NUMBER               = 5,
865     /** CS @stable ICU 2.0 */
866     U_COMMON_NUMBER_SEPARATOR     = 6,
867     /** B @stable ICU 2.0 */
868     U_BLOCK_SEPARATOR             = 7,
869     /** S @stable ICU 2.0 */
870     U_SEGMENT_SEPARATOR           = 8,
871     /** WS @stable ICU 2.0 */
872     U_WHITE_SPACE_NEUTRAL         = 9,
873     /** ON @stable ICU 2.0 */
874     U_OTHER_NEUTRAL               = 10,
875     /** LRE @stable ICU 2.0 */
876     U_LEFT_TO_RIGHT_EMBEDDING     = 11,
877     /** LRO @stable ICU 2.0 */
878     U_LEFT_TO_RIGHT_OVERRIDE      = 12,
879     /** AL @stable ICU 2.0 */
880     U_RIGHT_TO_LEFT_ARABIC        = 13,
881     /** RLE @stable ICU 2.0 */
882     U_RIGHT_TO_LEFT_EMBEDDING     = 14,
883     /** RLO @stable ICU 2.0 */
884     U_RIGHT_TO_LEFT_OVERRIDE      = 15,
885     /** PDF @stable ICU 2.0 */
886     U_POP_DIRECTIONAL_FORMAT      = 16,
887     /** NSM @stable ICU 2.0 */
888     U_DIR_NON_SPACING_MARK        = 17,
889     /** BN @stable ICU 2.0 */
890     U_BOUNDARY_NEUTRAL            = 18,
891     /** FSI @stable ICU 52 */
892     U_FIRST_STRONG_ISOLATE        = 19,
893     /** LRI @stable ICU 52 */
894     U_LEFT_TO_RIGHT_ISOLATE       = 20,
895     /** RLI @stable ICU 52 */
896     U_RIGHT_TO_LEFT_ISOLATE       = 21,
897     /** PDI @stable ICU 52 */
898     U_POP_DIRECTIONAL_ISOLATE     = 22,
899 #ifndef U_HIDE_DEPRECATED_API
900     /**
901      * One more than the highest UCharDirection value.
902      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS).
903      *
904      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
905      */
906     U_CHAR_DIRECTION_COUNT
907 #endif  // U_HIDE_DEPRECATED_API
908 } UCharDirection;
909 
910 /**
911  * Bidi Paired Bracket Type constants.
912  *
913  * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE
914  * @stable ICU 52
915  */
916 typedef enum UBidiPairedBracketType {
917     /*
918      * Note: UBidiPairedBracketType constants are parsed by preparseucd.py.
919      * It matches lines like
920      *     U_BPT_<Unicode Bidi_Paired_Bracket_Type value name>
921      */
922 
923     /** Not a paired bracket. @stable ICU 52 */
924     U_BPT_NONE,
925     /** Open paired bracket. @stable ICU 52 */
926     U_BPT_OPEN,
927     /** Close paired bracket. @stable ICU 52 */
928     U_BPT_CLOSE,
929 #ifndef U_HIDE_DEPRECATED_API
930     /**
931      * One more than the highest normal UBidiPairedBracketType value.
932      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BIDI_PAIRED_BRACKET_TYPE).
933      *
934      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
935      */
936     U_BPT_COUNT /* 3 */
937 #endif  // U_HIDE_DEPRECATED_API
938 } UBidiPairedBracketType;
939 
940 /**
941  * Constants for Unicode blocks, see the Unicode Data file Blocks.txt
942  * @stable ICU 2.0
943  */
944 enum UBlockCode {
945     /*
946      * Note: UBlockCode constants are parsed by preparseucd.py.
947      * It matches lines like
948      *     UBLOCK_<Unicode Block value name> = <integer>,
949      */
950 
951     /** New No_Block value in Unicode 4. @stable ICU 2.6 */
952     UBLOCK_NO_BLOCK = 0, /*[none]*/ /* Special range indicating No_Block */
953 
954     /** @stable ICU 2.0 */
955     UBLOCK_BASIC_LATIN = 1, /*[0000]*/
956 
957     /** @stable ICU 2.0 */
958     UBLOCK_LATIN_1_SUPPLEMENT=2, /*[0080]*/
959 
960     /** @stable ICU 2.0 */
961     UBLOCK_LATIN_EXTENDED_A =3, /*[0100]*/
962 
963     /** @stable ICU 2.0 */
964     UBLOCK_LATIN_EXTENDED_B =4, /*[0180]*/
965 
966     /** @stable ICU 2.0 */
967     UBLOCK_IPA_EXTENSIONS =5, /*[0250]*/
968 
969     /** @stable ICU 2.0 */
970     UBLOCK_SPACING_MODIFIER_LETTERS =6, /*[02B0]*/
971 
972     /** @stable ICU 2.0 */
973     UBLOCK_COMBINING_DIACRITICAL_MARKS =7, /*[0300]*/
974 
975     /**
976      * Unicode 3.2 renames this block to "Greek and Coptic".
977      * @stable ICU 2.0
978      */
979     UBLOCK_GREEK =8, /*[0370]*/
980 
981     /** @stable ICU 2.0 */
982     UBLOCK_CYRILLIC =9, /*[0400]*/
983 
984     /** @stable ICU 2.0 */
985     UBLOCK_ARMENIAN =10, /*[0530]*/
986 
987     /** @stable ICU 2.0 */
988     UBLOCK_HEBREW =11, /*[0590]*/
989 
990     /** @stable ICU 2.0 */
991     UBLOCK_ARABIC =12, /*[0600]*/
992 
993     /** @stable ICU 2.0 */
994     UBLOCK_SYRIAC =13, /*[0700]*/
995 
996     /** @stable ICU 2.0 */
997     UBLOCK_THAANA =14, /*[0780]*/
998 
999     /** @stable ICU 2.0 */
1000     UBLOCK_DEVANAGARI =15, /*[0900]*/
1001 
1002     /** @stable ICU 2.0 */
1003     UBLOCK_BENGALI =16, /*[0980]*/
1004 
1005     /** @stable ICU 2.0 */
1006     UBLOCK_GURMUKHI =17, /*[0A00]*/
1007 
1008     /** @stable ICU 2.0 */
1009     UBLOCK_GUJARATI =18, /*[0A80]*/
1010 
1011     /** @stable ICU 2.0 */
1012     UBLOCK_ORIYA =19, /*[0B00]*/
1013 
1014     /** @stable ICU 2.0 */
1015     UBLOCK_TAMIL =20, /*[0B80]*/
1016 
1017     /** @stable ICU 2.0 */
1018     UBLOCK_TELUGU =21, /*[0C00]*/
1019 
1020     /** @stable ICU 2.0 */
1021     UBLOCK_KANNADA =22, /*[0C80]*/
1022 
1023     /** @stable ICU 2.0 */
1024     UBLOCK_MALAYALAM =23, /*[0D00]*/
1025 
1026     /** @stable ICU 2.0 */
1027     UBLOCK_SINHALA =24, /*[0D80]*/
1028 
1029     /** @stable ICU 2.0 */
1030     UBLOCK_THAI =25, /*[0E00]*/
1031 
1032     /** @stable ICU 2.0 */
1033     UBLOCK_LAO =26, /*[0E80]*/
1034 
1035     /** @stable ICU 2.0 */
1036     UBLOCK_TIBETAN =27, /*[0F00]*/
1037 
1038     /** @stable ICU 2.0 */
1039     UBLOCK_MYANMAR =28, /*[1000]*/
1040 
1041     /** @stable ICU 2.0 */
1042     UBLOCK_GEORGIAN =29, /*[10A0]*/
1043 
1044     /** @stable ICU 2.0 */
1045     UBLOCK_HANGUL_JAMO =30, /*[1100]*/
1046 
1047     /** @stable ICU 2.0 */
1048     UBLOCK_ETHIOPIC =31, /*[1200]*/
1049 
1050     /** @stable ICU 2.0 */
1051     UBLOCK_CHEROKEE =32, /*[13A0]*/
1052 
1053     /** @stable ICU 2.0 */
1054     UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS =33, /*[1400]*/
1055 
1056     /** @stable ICU 2.0 */
1057     UBLOCK_OGHAM =34, /*[1680]*/
1058 
1059     /** @stable ICU 2.0 */
1060     UBLOCK_RUNIC =35, /*[16A0]*/
1061 
1062     /** @stable ICU 2.0 */
1063     UBLOCK_KHMER =36, /*[1780]*/
1064 
1065     /** @stable ICU 2.0 */
1066     UBLOCK_MONGOLIAN =37, /*[1800]*/
1067 
1068     /** @stable ICU 2.0 */
1069     UBLOCK_LATIN_EXTENDED_ADDITIONAL =38, /*[1E00]*/
1070 
1071     /** @stable ICU 2.0 */
1072     UBLOCK_GREEK_EXTENDED =39, /*[1F00]*/
1073 
1074     /** @stable ICU 2.0 */
1075     UBLOCK_GENERAL_PUNCTUATION =40, /*[2000]*/
1076 
1077     /** @stable ICU 2.0 */
1078     UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS =41, /*[2070]*/
1079 
1080     /** @stable ICU 2.0 */
1081     UBLOCK_CURRENCY_SYMBOLS =42, /*[20A0]*/
1082 
1083     /**
1084      * Unicode 3.2 renames this block to "Combining Diacritical Marks for Symbols".
1085      * @stable ICU 2.0
1086      */
1087     UBLOCK_COMBINING_MARKS_FOR_SYMBOLS =43, /*[20D0]*/
1088 
1089     /** @stable ICU 2.0 */
1090     UBLOCK_LETTERLIKE_SYMBOLS =44, /*[2100]*/
1091 
1092     /** @stable ICU 2.0 */
1093     UBLOCK_NUMBER_FORMS =45, /*[2150]*/
1094 
1095     /** @stable ICU 2.0 */
1096     UBLOCK_ARROWS =46, /*[2190]*/
1097 
1098     /** @stable ICU 2.0 */
1099     UBLOCK_MATHEMATICAL_OPERATORS =47, /*[2200]*/
1100 
1101     /** @stable ICU 2.0 */
1102     UBLOCK_MISCELLANEOUS_TECHNICAL =48, /*[2300]*/
1103 
1104     /** @stable ICU 2.0 */
1105     UBLOCK_CONTROL_PICTURES =49, /*[2400]*/
1106 
1107     /** @stable ICU 2.0 */
1108     UBLOCK_OPTICAL_CHARACTER_RECOGNITION =50, /*[2440]*/
1109 
1110     /** @stable ICU 2.0 */
1111     UBLOCK_ENCLOSED_ALPHANUMERICS =51, /*[2460]*/
1112 
1113     /** @stable ICU 2.0 */
1114     UBLOCK_BOX_DRAWING =52, /*[2500]*/
1115 
1116     /** @stable ICU 2.0 */
1117     UBLOCK_BLOCK_ELEMENTS =53, /*[2580]*/
1118 
1119     /** @stable ICU 2.0 */
1120     UBLOCK_GEOMETRIC_SHAPES =54, /*[25A0]*/
1121 
1122     /** @stable ICU 2.0 */
1123     UBLOCK_MISCELLANEOUS_SYMBOLS =55, /*[2600]*/
1124 
1125     /** @stable ICU 2.0 */
1126     UBLOCK_DINGBATS =56, /*[2700]*/
1127 
1128     /** @stable ICU 2.0 */
1129     UBLOCK_BRAILLE_PATTERNS =57, /*[2800]*/
1130 
1131     /** @stable ICU 2.0 */
1132     UBLOCK_CJK_RADICALS_SUPPLEMENT =58, /*[2E80]*/
1133 
1134     /** @stable ICU 2.0 */
1135     UBLOCK_KANGXI_RADICALS =59, /*[2F00]*/
1136 
1137     /** @stable ICU 2.0 */
1138     UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS =60, /*[2FF0]*/
1139 
1140     /** @stable ICU 2.0 */
1141     UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION =61, /*[3000]*/
1142 
1143     /** @stable ICU 2.0 */
1144     UBLOCK_HIRAGANA =62, /*[3040]*/
1145 
1146     /** @stable ICU 2.0 */
1147     UBLOCK_KATAKANA =63, /*[30A0]*/
1148 
1149     /** @stable ICU 2.0 */
1150     UBLOCK_BOPOMOFO =64, /*[3100]*/
1151 
1152     /** @stable ICU 2.0 */
1153     UBLOCK_HANGUL_COMPATIBILITY_JAMO =65, /*[3130]*/
1154 
1155     /** @stable ICU 2.0 */
1156     UBLOCK_KANBUN =66, /*[3190]*/
1157 
1158     /** @stable ICU 2.0 */
1159     UBLOCK_BOPOMOFO_EXTENDED =67, /*[31A0]*/
1160 
1161     /** @stable ICU 2.0 */
1162     UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS =68, /*[3200]*/
1163 
1164     /** @stable ICU 2.0 */
1165     UBLOCK_CJK_COMPATIBILITY =69, /*[3300]*/
1166 
1167     /** @stable ICU 2.0 */
1168     UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A =70, /*[3400]*/
1169 
1170     /** @stable ICU 2.0 */
1171     UBLOCK_CJK_UNIFIED_IDEOGRAPHS =71, /*[4E00]*/
1172 
1173     /** @stable ICU 2.0 */
1174     UBLOCK_YI_SYLLABLES =72, /*[A000]*/
1175 
1176     /** @stable ICU 2.0 */
1177     UBLOCK_YI_RADICALS =73, /*[A490]*/
1178 
1179     /** @stable ICU 2.0 */
1180     UBLOCK_HANGUL_SYLLABLES =74, /*[AC00]*/
1181 
1182     /** @stable ICU 2.0 */
1183     UBLOCK_HIGH_SURROGATES =75, /*[D800]*/
1184 
1185     /** @stable ICU 2.0 */
1186     UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, /*[DB80]*/
1187 
1188     /** @stable ICU 2.0 */
1189     UBLOCK_LOW_SURROGATES =77, /*[DC00]*/
1190 
1191     /**
1192      * Same as UBLOCK_PRIVATE_USE.
1193      * Until Unicode 3.1.1, the corresponding block name was "Private Use",
1194      * and multiple code point ranges had this block.
1195      * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and
1196      * adds separate blocks for the supplementary PUAs.
1197      *
1198      * @stable ICU 2.0
1199      */
1200     UBLOCK_PRIVATE_USE_AREA =78, /*[E000]*/
1201     /**
1202      * Same as UBLOCK_PRIVATE_USE_AREA.
1203      * Until Unicode 3.1.1, the corresponding block name was "Private Use",
1204      * and multiple code point ranges had this block.
1205      * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and
1206      * adds separate blocks for the supplementary PUAs.
1207      *
1208      * @stable ICU 2.0
1209      */
1210     UBLOCK_PRIVATE_USE = UBLOCK_PRIVATE_USE_AREA,
1211 
1212     /** @stable ICU 2.0 */
1213     UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, /*[F900]*/
1214 
1215     /** @stable ICU 2.0 */
1216     UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, /*[FB00]*/
1217 
1218     /** @stable ICU 2.0 */
1219     UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, /*[FB50]*/
1220 
1221     /** @stable ICU 2.0 */
1222     UBLOCK_COMBINING_HALF_MARKS =82, /*[FE20]*/
1223 
1224     /** @stable ICU 2.0 */
1225     UBLOCK_CJK_COMPATIBILITY_FORMS =83, /*[FE30]*/
1226 
1227     /** @stable ICU 2.0 */
1228     UBLOCK_SMALL_FORM_VARIANTS =84, /*[FE50]*/
1229 
1230     /** @stable ICU 2.0 */
1231     UBLOCK_ARABIC_PRESENTATION_FORMS_B =85, /*[FE70]*/
1232 
1233     /** @stable ICU 2.0 */
1234     UBLOCK_SPECIALS =86, /*[FFF0]*/
1235 
1236     /** @stable ICU 2.0 */
1237     UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, /*[FF00]*/
1238 
1239     /* New blocks in Unicode 3.1 */
1240 
1241     /** @stable ICU 2.0 */
1242     UBLOCK_OLD_ITALIC = 88, /*[10300]*/
1243     /** @stable ICU 2.0 */
1244     UBLOCK_GOTHIC = 89, /*[10330]*/
1245     /** @stable ICU 2.0 */
1246     UBLOCK_DESERET = 90, /*[10400]*/
1247     /** @stable ICU 2.0 */
1248     UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91, /*[1D000]*/
1249     /** @stable ICU 2.0 */
1250     UBLOCK_MUSICAL_SYMBOLS = 92, /*[1D100]*/
1251     /** @stable ICU 2.0 */
1252     UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93, /*[1D400]*/
1253     /** @stable ICU 2.0 */
1254     UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B  = 94, /*[20000]*/
1255     /** @stable ICU 2.0 */
1256     UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95, /*[2F800]*/
1257     /** @stable ICU 2.0 */
1258     UBLOCK_TAGS = 96, /*[E0000]*/
1259 
1260     /* New blocks in Unicode 3.2 */
1261 
1262     /** @stable ICU 3.0  */
1263     UBLOCK_CYRILLIC_SUPPLEMENT = 97, /*[0500]*/
1264     /**
1265      * Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrillic Supplement".
1266      * @stable ICU 2.2
1267      */
1268     UBLOCK_CYRILLIC_SUPPLEMENTARY = UBLOCK_CYRILLIC_SUPPLEMENT,
1269     /** @stable ICU 2.2 */
1270     UBLOCK_TAGALOG = 98, /*[1700]*/
1271     /** @stable ICU 2.2 */
1272     UBLOCK_HANUNOO = 99, /*[1720]*/
1273     /** @stable ICU 2.2 */
1274     UBLOCK_BUHID = 100, /*[1740]*/
1275     /** @stable ICU 2.2 */
1276     UBLOCK_TAGBANWA = 101, /*[1760]*/
1277     /** @stable ICU 2.2 */
1278     UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, /*[27C0]*/
1279     /** @stable ICU 2.2 */
1280     UBLOCK_SUPPLEMENTAL_ARROWS_A = 103, /*[27F0]*/
1281     /** @stable ICU 2.2 */
1282     UBLOCK_SUPPLEMENTAL_ARROWS_B = 104, /*[2900]*/
1283     /** @stable ICU 2.2 */
1284     UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = 105, /*[2980]*/
1285     /** @stable ICU 2.2 */
1286     UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS = 106, /*[2A00]*/
1287     /** @stable ICU 2.2 */
1288     UBLOCK_KATAKANA_PHONETIC_EXTENSIONS = 107, /*[31F0]*/
1289     /** @stable ICU 2.2 */
1290     UBLOCK_VARIATION_SELECTORS = 108, /*[FE00]*/
1291     /** @stable ICU 2.2 */
1292     UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A = 109, /*[F0000]*/
1293     /** @stable ICU 2.2 */
1294     UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B = 110, /*[100000]*/
1295 
1296     /* New blocks in Unicode 4 */
1297 
1298     /** @stable ICU 2.6 */
1299     UBLOCK_LIMBU = 111, /*[1900]*/
1300     /** @stable ICU 2.6 */
1301     UBLOCK_TAI_LE = 112, /*[1950]*/
1302     /** @stable ICU 2.6 */
1303     UBLOCK_KHMER_SYMBOLS = 113, /*[19E0]*/
1304     /** @stable ICU 2.6 */
1305     UBLOCK_PHONETIC_EXTENSIONS = 114, /*[1D00]*/
1306     /** @stable ICU 2.6 */
1307     UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS = 115, /*[2B00]*/
1308     /** @stable ICU 2.6 */
1309     UBLOCK_YIJING_HEXAGRAM_SYMBOLS = 116, /*[4DC0]*/
1310     /** @stable ICU 2.6 */
1311     UBLOCK_LINEAR_B_SYLLABARY = 117, /*[10000]*/
1312     /** @stable ICU 2.6 */
1313     UBLOCK_LINEAR_B_IDEOGRAMS = 118, /*[10080]*/
1314     /** @stable ICU 2.6 */
1315     UBLOCK_AEGEAN_NUMBERS = 119, /*[10100]*/
1316     /** @stable ICU 2.6 */
1317     UBLOCK_UGARITIC = 120, /*[10380]*/
1318     /** @stable ICU 2.6 */
1319     UBLOCK_SHAVIAN = 121, /*[10450]*/
1320     /** @stable ICU 2.6 */
1321     UBLOCK_OSMANYA = 122, /*[10480]*/
1322     /** @stable ICU 2.6 */
1323     UBLOCK_CYPRIOT_SYLLABARY = 123, /*[10800]*/
1324     /** @stable ICU 2.6 */
1325     UBLOCK_TAI_XUAN_JING_SYMBOLS = 124, /*[1D300]*/
1326     /** @stable ICU 2.6 */
1327     UBLOCK_VARIATION_SELECTORS_SUPPLEMENT = 125, /*[E0100]*/
1328 
1329     /* New blocks in Unicode 4.1 */
1330 
1331     /** @stable ICU 3.4 */
1332     UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION = 126, /*[1D200]*/
1333     /** @stable ICU 3.4 */
1334     UBLOCK_ANCIENT_GREEK_NUMBERS = 127, /*[10140]*/
1335     /** @stable ICU 3.4 */
1336     UBLOCK_ARABIC_SUPPLEMENT = 128, /*[0750]*/
1337     /** @stable ICU 3.4 */
1338     UBLOCK_BUGINESE = 129, /*[1A00]*/
1339     /** @stable ICU 3.4 */
1340     UBLOCK_CJK_STROKES = 130, /*[31C0]*/
1341     /** @stable ICU 3.4 */
1342     UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = 131, /*[1DC0]*/
1343     /** @stable ICU 3.4 */
1344     UBLOCK_COPTIC = 132, /*[2C80]*/
1345     /** @stable ICU 3.4 */
1346     UBLOCK_ETHIOPIC_EXTENDED = 133, /*[2D80]*/
1347     /** @stable ICU 3.4 */
1348     UBLOCK_ETHIOPIC_SUPPLEMENT = 134, /*[1380]*/
1349     /** @stable ICU 3.4 */
1350     UBLOCK_GEORGIAN_SUPPLEMENT = 135, /*[2D00]*/
1351     /** @stable ICU 3.4 */
1352     UBLOCK_GLAGOLITIC = 136, /*[2C00]*/
1353     /** @stable ICU 3.4 */
1354     UBLOCK_KHAROSHTHI = 137, /*[10A00]*/
1355     /** @stable ICU 3.4 */
1356     UBLOCK_MODIFIER_TONE_LETTERS = 138, /*[A700]*/
1357     /** @stable ICU 3.4 */
1358     UBLOCK_NEW_TAI_LUE = 139, /*[1980]*/
1359     /** @stable ICU 3.4 */
1360     UBLOCK_OLD_PERSIAN = 140, /*[103A0]*/
1361     /** @stable ICU 3.4 */
1362     UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT = 141, /*[1D80]*/
1363     /** @stable ICU 3.4 */
1364     UBLOCK_SUPPLEMENTAL_PUNCTUATION = 142, /*[2E00]*/
1365     /** @stable ICU 3.4 */
1366     UBLOCK_SYLOTI_NAGRI = 143, /*[A800]*/
1367     /** @stable ICU 3.4 */
1368     UBLOCK_TIFINAGH = 144, /*[2D30]*/
1369     /** @stable ICU 3.4 */
1370     UBLOCK_VERTICAL_FORMS = 145, /*[FE10]*/
1371 
1372     /* New blocks in Unicode 5.0 */
1373 
1374     /** @stable ICU 3.6 */
1375     UBLOCK_NKO = 146, /*[07C0]*/
1376     /** @stable ICU 3.6 */
1377     UBLOCK_BALINESE = 147, /*[1B00]*/
1378     /** @stable ICU 3.6 */
1379     UBLOCK_LATIN_EXTENDED_C = 148, /*[2C60]*/
1380     /** @stable ICU 3.6 */
1381     UBLOCK_LATIN_EXTENDED_D = 149, /*[A720]*/
1382     /** @stable ICU 3.6 */
1383     UBLOCK_PHAGS_PA = 150, /*[A840]*/
1384     /** @stable ICU 3.6 */
1385     UBLOCK_PHOENICIAN = 151, /*[10900]*/
1386     /** @stable ICU 3.6 */
1387     UBLOCK_CUNEIFORM = 152, /*[12000]*/
1388     /** @stable ICU 3.6 */
1389     UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION = 153, /*[12400]*/
1390     /** @stable ICU 3.6 */
1391     UBLOCK_COUNTING_ROD_NUMERALS = 154, /*[1D360]*/
1392 
1393     /* New blocks in Unicode 5.1 */
1394 
1395     /** @stable ICU 4.0 */
1396     UBLOCK_SUNDANESE = 155, /*[1B80]*/
1397     /** @stable ICU 4.0 */
1398     UBLOCK_LEPCHA = 156, /*[1C00]*/
1399     /** @stable ICU 4.0 */
1400     UBLOCK_OL_CHIKI = 157, /*[1C50]*/
1401     /** @stable ICU 4.0 */
1402     UBLOCK_CYRILLIC_EXTENDED_A = 158, /*[2DE0]*/
1403     /** @stable ICU 4.0 */
1404     UBLOCK_VAI = 159, /*[A500]*/
1405     /** @stable ICU 4.0 */
1406     UBLOCK_CYRILLIC_EXTENDED_B = 160, /*[A640]*/
1407     /** @stable ICU 4.0 */
1408     UBLOCK_SAURASHTRA = 161, /*[A880]*/
1409     /** @stable ICU 4.0 */
1410     UBLOCK_KAYAH_LI = 162, /*[A900]*/
1411     /** @stable ICU 4.0 */
1412     UBLOCK_REJANG = 163, /*[A930]*/
1413     /** @stable ICU 4.0 */
1414     UBLOCK_CHAM = 164, /*[AA00]*/
1415     /** @stable ICU 4.0 */
1416     UBLOCK_ANCIENT_SYMBOLS = 165, /*[10190]*/
1417     /** @stable ICU 4.0 */
1418     UBLOCK_PHAISTOS_DISC = 166, /*[101D0]*/
1419     /** @stable ICU 4.0 */
1420     UBLOCK_LYCIAN = 167, /*[10280]*/
1421     /** @stable ICU 4.0 */
1422     UBLOCK_CARIAN = 168, /*[102A0]*/
1423     /** @stable ICU 4.0 */
1424     UBLOCK_LYDIAN = 169, /*[10920]*/
1425     /** @stable ICU 4.0 */
1426     UBLOCK_MAHJONG_TILES = 170, /*[1F000]*/
1427     /** @stable ICU 4.0 */
1428     UBLOCK_DOMINO_TILES = 171, /*[1F030]*/
1429 
1430     /* New blocks in Unicode 5.2 */
1431 
1432     /** @stable ICU 4.4 */
1433     UBLOCK_SAMARITAN = 172, /*[0800]*/
1434     /** @stable ICU 4.4 */
1435     UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED = 173, /*[18B0]*/
1436     /** @stable ICU 4.4 */
1437     UBLOCK_TAI_THAM = 174, /*[1A20]*/
1438     /** @stable ICU 4.4 */
1439     UBLOCK_VEDIC_EXTENSIONS = 175, /*[1CD0]*/
1440     /** @stable ICU 4.4 */
1441     UBLOCK_LISU = 176, /*[A4D0]*/
1442     /** @stable ICU 4.4 */
1443     UBLOCK_BAMUM = 177, /*[A6A0]*/
1444     /** @stable ICU 4.4 */
1445     UBLOCK_COMMON_INDIC_NUMBER_FORMS = 178, /*[A830]*/
1446     /** @stable ICU 4.4 */
1447     UBLOCK_DEVANAGARI_EXTENDED = 179, /*[A8E0]*/
1448     /** @stable ICU 4.4 */
1449     UBLOCK_HANGUL_JAMO_EXTENDED_A = 180, /*[A960]*/
1450     /** @stable ICU 4.4 */
1451     UBLOCK_JAVANESE = 181, /*[A980]*/
1452     /** @stable ICU 4.4 */
1453     UBLOCK_MYANMAR_EXTENDED_A = 182, /*[AA60]*/
1454     /** @stable ICU 4.4 */
1455     UBLOCK_TAI_VIET = 183, /*[AA80]*/
1456     /** @stable ICU 4.4 */
1457     UBLOCK_MEETEI_MAYEK = 184, /*[ABC0]*/
1458     /** @stable ICU 4.4 */
1459     UBLOCK_HANGUL_JAMO_EXTENDED_B = 185, /*[D7B0]*/
1460     /** @stable ICU 4.4 */
1461     UBLOCK_IMPERIAL_ARAMAIC = 186, /*[10840]*/
1462     /** @stable ICU 4.4 */
1463     UBLOCK_OLD_SOUTH_ARABIAN = 187, /*[10A60]*/
1464     /** @stable ICU 4.4 */
1465     UBLOCK_AVESTAN = 188, /*[10B00]*/
1466     /** @stable ICU 4.4 */
1467     UBLOCK_INSCRIPTIONAL_PARTHIAN = 189, /*[10B40]*/
1468     /** @stable ICU 4.4 */
1469     UBLOCK_INSCRIPTIONAL_PAHLAVI = 190, /*[10B60]*/
1470     /** @stable ICU 4.4 */
1471     UBLOCK_OLD_TURKIC = 191, /*[10C00]*/
1472     /** @stable ICU 4.4 */
1473     UBLOCK_RUMI_NUMERAL_SYMBOLS = 192, /*[10E60]*/
1474     /** @stable ICU 4.4 */
1475     UBLOCK_KAITHI = 193, /*[11080]*/
1476     /** @stable ICU 4.4 */
1477     UBLOCK_EGYPTIAN_HIEROGLYPHS = 194, /*[13000]*/
1478     /** @stable ICU 4.4 */
1479     UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT = 195, /*[1F100]*/
1480     /** @stable ICU 4.4 */
1481     UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT = 196, /*[1F200]*/
1482     /** @stable ICU 4.4 */
1483     UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C = 197, /*[2A700]*/
1484 
1485     /* New blocks in Unicode 6.0 */
1486 
1487     /** @stable ICU 4.6 */
1488     UBLOCK_MANDAIC = 198, /*[0840]*/
1489     /** @stable ICU 4.6 */
1490     UBLOCK_BATAK = 199, /*[1BC0]*/
1491     /** @stable ICU 4.6 */
1492     UBLOCK_ETHIOPIC_EXTENDED_A = 200, /*[AB00]*/
1493     /** @stable ICU 4.6 */
1494     UBLOCK_BRAHMI = 201, /*[11000]*/
1495     /** @stable ICU 4.6 */
1496     UBLOCK_BAMUM_SUPPLEMENT = 202, /*[16800]*/
1497     /** @stable ICU 4.6 */
1498     UBLOCK_KANA_SUPPLEMENT = 203, /*[1B000]*/
1499     /** @stable ICU 4.6 */
1500     UBLOCK_PLAYING_CARDS = 204, /*[1F0A0]*/
1501     /** @stable ICU 4.6 */
1502     UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205, /*[1F300]*/
1503     /** @stable ICU 4.6 */
1504     UBLOCK_EMOTICONS = 206, /*[1F600]*/
1505     /** @stable ICU 4.6 */
1506     UBLOCK_TRANSPORT_AND_MAP_SYMBOLS = 207, /*[1F680]*/
1507     /** @stable ICU 4.6 */
1508     UBLOCK_ALCHEMICAL_SYMBOLS = 208, /*[1F700]*/
1509     /** @stable ICU 4.6 */
1510     UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209, /*[2B740]*/
1511 
1512     /* New blocks in Unicode 6.1 */
1513 
1514     /** @stable ICU 49 */
1515     UBLOCK_ARABIC_EXTENDED_A = 210, /*[08A0]*/
1516     /** @stable ICU 49 */
1517     UBLOCK_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS = 211, /*[1EE00]*/
1518     /** @stable ICU 49 */
1519     UBLOCK_CHAKMA = 212, /*[11100]*/
1520     /** @stable ICU 49 */
1521     UBLOCK_MEETEI_MAYEK_EXTENSIONS = 213, /*[AAE0]*/
1522     /** @stable ICU 49 */
1523     UBLOCK_MEROITIC_CURSIVE = 214, /*[109A0]*/
1524     /** @stable ICU 49 */
1525     UBLOCK_MEROITIC_HIEROGLYPHS = 215, /*[10980]*/
1526     /** @stable ICU 49 */
1527     UBLOCK_MIAO = 216, /*[16F00]*/
1528     /** @stable ICU 49 */
1529     UBLOCK_SHARADA = 217, /*[11180]*/
1530     /** @stable ICU 49 */
1531     UBLOCK_SORA_SOMPENG = 218, /*[110D0]*/
1532     /** @stable ICU 49 */
1533     UBLOCK_SUNDANESE_SUPPLEMENT = 219, /*[1CC0]*/
1534     /** @stable ICU 49 */
1535     UBLOCK_TAKRI = 220, /*[11680]*/
1536 
1537     /* New blocks in Unicode 7.0 */
1538 
1539     /** @stable ICU 54 */
1540     UBLOCK_BASSA_VAH = 221, /*[16AD0]*/
1541     /** @stable ICU 54 */
1542     UBLOCK_CAUCASIAN_ALBANIAN = 222, /*[10530]*/
1543     /** @stable ICU 54 */
1544     UBLOCK_COPTIC_EPACT_NUMBERS = 223, /*[102E0]*/
1545     /** @stable ICU 54 */
1546     UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224, /*[1AB0]*/
1547     /** @stable ICU 54 */
1548     UBLOCK_DUPLOYAN = 225, /*[1BC00]*/
1549     /** @stable ICU 54 */
1550     UBLOCK_ELBASAN = 226, /*[10500]*/
1551     /** @stable ICU 54 */
1552     UBLOCK_GEOMETRIC_SHAPES_EXTENDED = 227, /*[1F780]*/
1553     /** @stable ICU 54 */
1554     UBLOCK_GRANTHA = 228, /*[11300]*/
1555     /** @stable ICU 54 */
1556     UBLOCK_KHOJKI = 229, /*[11200]*/
1557     /** @stable ICU 54 */
1558     UBLOCK_KHUDAWADI = 230, /*[112B0]*/
1559     /** @stable ICU 54 */
1560     UBLOCK_LATIN_EXTENDED_E = 231, /*[AB30]*/
1561     /** @stable ICU 54 */
1562     UBLOCK_LINEAR_A = 232, /*[10600]*/
1563     /** @stable ICU 54 */
1564     UBLOCK_MAHAJANI = 233, /*[11150]*/
1565     /** @stable ICU 54 */
1566     UBLOCK_MANICHAEAN = 234, /*[10AC0]*/
1567     /** @stable ICU 54 */
1568     UBLOCK_MENDE_KIKAKUI = 235, /*[1E800]*/
1569     /** @stable ICU 54 */
1570     UBLOCK_MODI = 236, /*[11600]*/
1571     /** @stable ICU 54 */
1572     UBLOCK_MRO = 237, /*[16A40]*/
1573     /** @stable ICU 54 */
1574     UBLOCK_MYANMAR_EXTENDED_B = 238, /*[A9E0]*/
1575     /** @stable ICU 54 */
1576     UBLOCK_NABATAEAN = 239, /*[10880]*/
1577     /** @stable ICU 54 */
1578     UBLOCK_OLD_NORTH_ARABIAN = 240, /*[10A80]*/
1579     /** @stable ICU 54 */
1580     UBLOCK_OLD_PERMIC = 241, /*[10350]*/
1581     /** @stable ICU 54 */
1582     UBLOCK_ORNAMENTAL_DINGBATS = 242, /*[1F650]*/
1583     /** @stable ICU 54 */
1584     UBLOCK_PAHAWH_HMONG = 243, /*[16B00]*/
1585     /** @stable ICU 54 */
1586     UBLOCK_PALMYRENE = 244, /*[10860]*/
1587     /** @stable ICU 54 */
1588     UBLOCK_PAU_CIN_HAU = 245, /*[11AC0]*/
1589     /** @stable ICU 54 */
1590     UBLOCK_PSALTER_PAHLAVI = 246, /*[10B80]*/
1591     /** @stable ICU 54 */
1592     UBLOCK_SHORTHAND_FORMAT_CONTROLS = 247, /*[1BCA0]*/
1593     /** @stable ICU 54 */
1594     UBLOCK_SIDDHAM = 248, /*[11580]*/
1595     /** @stable ICU 54 */
1596     UBLOCK_SINHALA_ARCHAIC_NUMBERS = 249, /*[111E0]*/
1597     /** @stable ICU 54 */
1598     UBLOCK_SUPPLEMENTAL_ARROWS_C = 250, /*[1F800]*/
1599     /** @stable ICU 54 */
1600     UBLOCK_TIRHUTA = 251, /*[11480]*/
1601     /** @stable ICU 54 */
1602     UBLOCK_WARANG_CITI = 252, /*[118A0]*/
1603 
1604     /* New blocks in Unicode 8.0 */
1605 
1606     /** @stable ICU 56 */
1607     UBLOCK_AHOM = 253, /*[11700]*/
1608     /** @stable ICU 56 */
1609     UBLOCK_ANATOLIAN_HIEROGLYPHS = 254, /*[14400]*/
1610     /** @stable ICU 56 */
1611     UBLOCK_CHEROKEE_SUPPLEMENT = 255, /*[AB70]*/
1612     /** @stable ICU 56 */
1613     UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E = 256, /*[2B820]*/
1614     /** @stable ICU 56 */
1615     UBLOCK_EARLY_DYNASTIC_CUNEIFORM = 257, /*[12480]*/
1616     /** @stable ICU 56 */
1617     UBLOCK_HATRAN = 258, /*[108E0]*/
1618     /** @stable ICU 56 */
1619     UBLOCK_MULTANI = 259, /*[11280]*/
1620     /** @stable ICU 56 */
1621     UBLOCK_OLD_HUNGARIAN = 260, /*[10C80]*/
1622     /** @stable ICU 56 */
1623     UBLOCK_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS = 261, /*[1F900]*/
1624     /** @stable ICU 56 */
1625     UBLOCK_SUTTON_SIGNWRITING = 262, /*[1D800]*/
1626 
1627     /* New blocks in Unicode 9.0 */
1628 
1629     /** @stable ICU 58 */
1630     UBLOCK_ADLAM = 263, /*[1E900]*/
1631     /** @stable ICU 58 */
1632     UBLOCK_BHAIKSUKI = 264, /*[11C00]*/
1633     /** @stable ICU 58 */
1634     UBLOCK_CYRILLIC_EXTENDED_C = 265, /*[1C80]*/
1635     /** @stable ICU 58 */
1636     UBLOCK_GLAGOLITIC_SUPPLEMENT = 266, /*[1E000]*/
1637     /** @stable ICU 58 */
1638     UBLOCK_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION = 267, /*[16FE0]*/
1639     /** @stable ICU 58 */
1640     UBLOCK_MARCHEN = 268, /*[11C70]*/
1641     /** @stable ICU 58 */
1642     UBLOCK_MONGOLIAN_SUPPLEMENT = 269, /*[11660]*/
1643     /** @stable ICU 58 */
1644     UBLOCK_NEWA = 270, /*[11400]*/
1645     /** @stable ICU 58 */
1646     UBLOCK_OSAGE = 271, /*[104B0]*/
1647     /** @stable ICU 58 */
1648     UBLOCK_TANGUT = 272, /*[17000]*/
1649     /** @stable ICU 58 */
1650     UBLOCK_TANGUT_COMPONENTS = 273, /*[18800]*/
1651 
1652 #ifndef U_HIDE_DEPRECATED_API
1653     /**
1654      * One more than the highest normal UBlockCode value.
1655      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BLOCK).
1656      *
1657      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1658      */
1659     UBLOCK_COUNT = 274,
1660 #endif  // U_HIDE_DEPRECATED_API
1661 
1662     /** @stable ICU 2.0 */
1663     UBLOCK_INVALID_CODE=-1
1664 };
1665 
1666 /** @stable ICU 2.0 */
1667 typedef enum UBlockCode UBlockCode;
1668 
1669 /**
1670  * East Asian Width constants.
1671  *
1672  * @see UCHAR_EAST_ASIAN_WIDTH
1673  * @see u_getIntPropertyValue
1674  * @stable ICU 2.2
1675  */
1676 typedef enum UEastAsianWidth {
1677     /*
1678      * Note: UEastAsianWidth constants are parsed by preparseucd.py.
1679      * It matches lines like
1680      *     U_EA_<Unicode East_Asian_Width value name>
1681      */
1682 
1683     U_EA_NEUTRAL,   /*[N]*/
1684     U_EA_AMBIGUOUS, /*[A]*/
1685     U_EA_HALFWIDTH, /*[H]*/
1686     U_EA_FULLWIDTH, /*[F]*/
1687     U_EA_NARROW,    /*[Na]*/
1688     U_EA_WIDE,      /*[W]*/
1689 #ifndef U_HIDE_DEPRECATED_API
1690     /**
1691      * One more than the highest normal UEastAsianWidth value.
1692      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH).
1693      *
1694      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1695      */
1696     U_EA_COUNT
1697 #endif  // U_HIDE_DEPRECATED_API
1698 } UEastAsianWidth;
1699 
1700 /**
1701  * Selector constants for u_charName().
1702  * u_charName() returns the "modern" name of a
1703  * Unicode character; or the name that was defined in
1704  * Unicode version 1.0, before the Unicode standard merged
1705  * with ISO-10646; or an "extended" name that gives each
1706  * Unicode code point a unique name.
1707  *
1708  * @see u_charName
1709  * @stable ICU 2.0
1710  */
1711 typedef enum UCharNameChoice {
1712     /** Unicode character name (Name property). @stable ICU 2.0 */
1713     U_UNICODE_CHAR_NAME,
1714 #ifndef U_HIDE_DEPRECATED_API
1715     /**
1716      * The Unicode_1_Name property value which is of little practical value.
1717      * Beginning with ICU 49, ICU APIs return an empty string for this name choice.
1718      * @deprecated ICU 49
1719      */
1720     U_UNICODE_10_CHAR_NAME,
1721 #endif  /* U_HIDE_DEPRECATED_API */
1722     /** Standard or synthetic character name. @stable ICU 2.0 */
1723     U_EXTENDED_CHAR_NAME = U_UNICODE_CHAR_NAME+2,
1724     /** Corrected name from NameAliases.txt. @stable ICU 4.4 */
1725     U_CHAR_NAME_ALIAS,
1726 #ifndef U_HIDE_DEPRECATED_API
1727     /**
1728      * One more than the highest normal UCharNameChoice value.
1729      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1730      */
1731     U_CHAR_NAME_CHOICE_COUNT
1732 #endif  // U_HIDE_DEPRECATED_API
1733 } UCharNameChoice;
1734 
1735 /**
1736  * Selector constants for u_getPropertyName() and
1737  * u_getPropertyValueName().  These selectors are used to choose which
1738  * name is returned for a given property or value.  All properties and
1739  * values have a long name.  Most have a short name, but some do not.
1740  * Unicode allows for additional names, beyond the long and short
1741  * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where
1742  * i=1, 2,...
1743  *
1744  * @see u_getPropertyName()
1745  * @see u_getPropertyValueName()
1746  * @stable ICU 2.4
1747  */
1748 typedef enum UPropertyNameChoice {
1749     U_SHORT_PROPERTY_NAME,
1750     U_LONG_PROPERTY_NAME,
1751 #ifndef U_HIDE_DEPRECATED_API
1752     /**
1753      * One more than the highest normal UPropertyNameChoice value.
1754      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1755      */
1756     U_PROPERTY_NAME_CHOICE_COUNT
1757 #endif  // U_HIDE_DEPRECATED_API
1758 } UPropertyNameChoice;
1759 
1760 /**
1761  * Decomposition Type constants.
1762  *
1763  * @see UCHAR_DECOMPOSITION_TYPE
1764  * @stable ICU 2.2
1765  */
1766 typedef enum UDecompositionType {
1767     /*
1768      * Note: UDecompositionType constants are parsed by preparseucd.py.
1769      * It matches lines like
1770      *     U_DT_<Unicode Decomposition_Type value name>
1771      */
1772 
1773     U_DT_NONE,              /*[none]*/
1774     U_DT_CANONICAL,         /*[can]*/
1775     U_DT_COMPAT,            /*[com]*/
1776     U_DT_CIRCLE,            /*[enc]*/
1777     U_DT_FINAL,             /*[fin]*/
1778     U_DT_FONT,              /*[font]*/
1779     U_DT_FRACTION,          /*[fra]*/
1780     U_DT_INITIAL,           /*[init]*/
1781     U_DT_ISOLATED,          /*[iso]*/
1782     U_DT_MEDIAL,            /*[med]*/
1783     U_DT_NARROW,            /*[nar]*/
1784     U_DT_NOBREAK,           /*[nb]*/
1785     U_DT_SMALL,             /*[sml]*/
1786     U_DT_SQUARE,            /*[sqr]*/
1787     U_DT_SUB,               /*[sub]*/
1788     U_DT_SUPER,             /*[sup]*/
1789     U_DT_VERTICAL,          /*[vert]*/
1790     U_DT_WIDE,              /*[wide]*/
1791 #ifndef U_HIDE_DEPRECATED_API
1792     /**
1793      * One more than the highest normal UDecompositionType value.
1794      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_DECOMPOSITION_TYPE).
1795      *
1796      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1797      */
1798     U_DT_COUNT /* 18 */
1799 #endif  // U_HIDE_DEPRECATED_API
1800 } UDecompositionType;
1801 
1802 /**
1803  * Joining Type constants.
1804  *
1805  * @see UCHAR_JOINING_TYPE
1806  * @stable ICU 2.2
1807  */
1808 typedef enum UJoiningType {
1809     /*
1810      * Note: UJoiningType constants are parsed by preparseucd.py.
1811      * It matches lines like
1812      *     U_JT_<Unicode Joining_Type value name>
1813      */
1814 
1815     U_JT_NON_JOINING,       /*[U]*/
1816     U_JT_JOIN_CAUSING,      /*[C]*/
1817     U_JT_DUAL_JOINING,      /*[D]*/
1818     U_JT_LEFT_JOINING,      /*[L]*/
1819     U_JT_RIGHT_JOINING,     /*[R]*/
1820     U_JT_TRANSPARENT,       /*[T]*/
1821 #ifndef U_HIDE_DEPRECATED_API
1822     /**
1823      * One more than the highest normal UJoiningType value.
1824      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_JOINING_TYPE).
1825      *
1826      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1827      */
1828     U_JT_COUNT /* 6 */
1829 #endif  // U_HIDE_DEPRECATED_API
1830 } UJoiningType;
1831 
1832 /**
1833  * Joining Group constants.
1834  *
1835  * @see UCHAR_JOINING_GROUP
1836  * @stable ICU 2.2
1837  */
1838 typedef enum UJoiningGroup {
1839     /*
1840      * Note: UJoiningGroup constants are parsed by preparseucd.py.
1841      * It matches lines like
1842      *     U_JG_<Unicode Joining_Group value name>
1843      */
1844 
1845     U_JG_NO_JOINING_GROUP,
1846     U_JG_AIN,
1847     U_JG_ALAPH,
1848     U_JG_ALEF,
1849     U_JG_BEH,
1850     U_JG_BETH,
1851     U_JG_DAL,
1852     U_JG_DALATH_RISH,
1853     U_JG_E,
1854     U_JG_FEH,
1855     U_JG_FINAL_SEMKATH,
1856     U_JG_GAF,
1857     U_JG_GAMAL,
1858     U_JG_HAH,
1859     U_JG_TEH_MARBUTA_GOAL,  /**< @stable ICU 4.6 */
1860     U_JG_HAMZA_ON_HEH_GOAL=U_JG_TEH_MARBUTA_GOAL,
1861     U_JG_HE,
1862     U_JG_HEH,
1863     U_JG_HEH_GOAL,
1864     U_JG_HETH,
1865     U_JG_KAF,
1866     U_JG_KAPH,
1867     U_JG_KNOTTED_HEH,
1868     U_JG_LAM,
1869     U_JG_LAMADH,
1870     U_JG_MEEM,
1871     U_JG_MIM,
1872     U_JG_NOON,
1873     U_JG_NUN,
1874     U_JG_PE,
1875     U_JG_QAF,
1876     U_JG_QAPH,
1877     U_JG_REH,
1878     U_JG_REVERSED_PE,
1879     U_JG_SAD,
1880     U_JG_SADHE,
1881     U_JG_SEEN,
1882     U_JG_SEMKATH,
1883     U_JG_SHIN,
1884     U_JG_SWASH_KAF,
1885     U_JG_SYRIAC_WAW,
1886     U_JG_TAH,
1887     U_JG_TAW,
1888     U_JG_TEH_MARBUTA,
1889     U_JG_TETH,
1890     U_JG_WAW,
1891     U_JG_YEH,
1892     U_JG_YEH_BARREE,
1893     U_JG_YEH_WITH_TAIL,
1894     U_JG_YUDH,
1895     U_JG_YUDH_HE,
1896     U_JG_ZAIN,
1897     U_JG_FE,        /**< @stable ICU 2.6 */
1898     U_JG_KHAPH,     /**< @stable ICU 2.6 */
1899     U_JG_ZHAIN,     /**< @stable ICU 2.6 */
1900     U_JG_BURUSHASKI_YEH_BARREE, /**< @stable ICU 4.0 */
1901     U_JG_FARSI_YEH, /**< @stable ICU 4.4 */
1902     U_JG_NYA,       /**< @stable ICU 4.4 */
1903     U_JG_ROHINGYA_YEH,  /**< @stable ICU 49 */
1904     U_JG_MANICHAEAN_ALEPH,  /**< @stable ICU 54 */
1905     U_JG_MANICHAEAN_AYIN,  /**< @stable ICU 54 */
1906     U_JG_MANICHAEAN_BETH,  /**< @stable ICU 54 */
1907     U_JG_MANICHAEAN_DALETH,  /**< @stable ICU 54 */
1908     U_JG_MANICHAEAN_DHAMEDH,  /**< @stable ICU 54 */
1909     U_JG_MANICHAEAN_FIVE,  /**< @stable ICU 54 */
1910     U_JG_MANICHAEAN_GIMEL,  /**< @stable ICU 54 */
1911     U_JG_MANICHAEAN_HETH,  /**< @stable ICU 54 */
1912     U_JG_MANICHAEAN_HUNDRED,  /**< @stable ICU 54 */
1913     U_JG_MANICHAEAN_KAPH,  /**< @stable ICU 54 */
1914     U_JG_MANICHAEAN_LAMEDH,  /**< @stable ICU 54 */
1915     U_JG_MANICHAEAN_MEM,  /**< @stable ICU 54 */
1916     U_JG_MANICHAEAN_NUN,  /**< @stable ICU 54 */
1917     U_JG_MANICHAEAN_ONE,  /**< @stable ICU 54 */
1918     U_JG_MANICHAEAN_PE,  /**< @stable ICU 54 */
1919     U_JG_MANICHAEAN_QOPH,  /**< @stable ICU 54 */
1920     U_JG_MANICHAEAN_RESH,  /**< @stable ICU 54 */
1921     U_JG_MANICHAEAN_SADHE,  /**< @stable ICU 54 */
1922     U_JG_MANICHAEAN_SAMEKH,  /**< @stable ICU 54 */
1923     U_JG_MANICHAEAN_TAW,  /**< @stable ICU 54 */
1924     U_JG_MANICHAEAN_TEN,  /**< @stable ICU 54 */
1925     U_JG_MANICHAEAN_TETH,  /**< @stable ICU 54 */
1926     U_JG_MANICHAEAN_THAMEDH,  /**< @stable ICU 54 */
1927     U_JG_MANICHAEAN_TWENTY,  /**< @stable ICU 54 */
1928     U_JG_MANICHAEAN_WAW,  /**< @stable ICU 54 */
1929     U_JG_MANICHAEAN_YODH,  /**< @stable ICU 54 */
1930     U_JG_MANICHAEAN_ZAYIN,  /**< @stable ICU 54 */
1931     U_JG_STRAIGHT_WAW,  /**< @stable ICU 54 */
1932     U_JG_AFRICAN_FEH,  /**< @stable ICU 58 */
1933     U_JG_AFRICAN_NOON,  /**< @stable ICU 58 */
1934     U_JG_AFRICAN_QAF,  /**< @stable ICU 58 */
1935 #ifndef U_HIDE_DEPRECATED_API
1936     /**
1937      * One more than the highest normal UJoiningGroup value.
1938      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_JOINING_GROUP).
1939      *
1940      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1941      */
1942     U_JG_COUNT
1943 #endif  // U_HIDE_DEPRECATED_API
1944 } UJoiningGroup;
1945 
1946 /**
1947  * Grapheme Cluster Break constants.
1948  *
1949  * @see UCHAR_GRAPHEME_CLUSTER_BREAK
1950  * @stable ICU 3.4
1951  */
1952 typedef enum UGraphemeClusterBreak {
1953     /*
1954      * Note: UGraphemeClusterBreak constants are parsed by preparseucd.py.
1955      * It matches lines like
1956      *     U_GCB_<Unicode Grapheme_Cluster_Break value name>
1957      */
1958 
1959     U_GCB_OTHER = 0,            /*[XX]*/
1960     U_GCB_CONTROL = 1,          /*[CN]*/
1961     U_GCB_CR = 2,               /*[CR]*/
1962     U_GCB_EXTEND = 3,           /*[EX]*/
1963     U_GCB_L = 4,                /*[L]*/
1964     U_GCB_LF = 5,               /*[LF]*/
1965     U_GCB_LV = 6,               /*[LV]*/
1966     U_GCB_LVT = 7,              /*[LVT]*/
1967     U_GCB_T = 8,                /*[T]*/
1968     U_GCB_V = 9,                /*[V]*/
1969     /** @stable ICU 4.0 */
1970     U_GCB_SPACING_MARK = 10,    /*[SM]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */
1971     /** @stable ICU 4.0 */
1972     U_GCB_PREPEND = 11,         /*[PP]*/
1973     /** @stable ICU 50 */
1974     U_GCB_REGIONAL_INDICATOR = 12,  /*[RI]*/ /* new in Unicode 6.2/ICU 50 */
1975     /** @stable ICU 58 */
1976     U_GCB_E_BASE = 13,          /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */
1977     /** @stable ICU 58 */
1978     U_GCB_E_BASE_GAZ = 14,      /*[EBG]*/
1979     /** @stable ICU 58 */
1980     U_GCB_E_MODIFIER = 15,      /*[EM]*/
1981     /** @stable ICU 58 */
1982     U_GCB_GLUE_AFTER_ZWJ = 16,  /*[GAZ]*/
1983     /** @stable ICU 58 */
1984     U_GCB_ZWJ = 17,             /*[ZWJ]*/
1985 #ifndef U_HIDE_DEPRECATED_API
1986     /**
1987      * One more than the highest normal UGraphemeClusterBreak value.
1988      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_GRAPHEME_CLUSTER_BREAK).
1989      *
1990      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1991      */
1992     U_GCB_COUNT = 18
1993 #endif  // U_HIDE_DEPRECATED_API
1994 } UGraphemeClusterBreak;
1995 
1996 /**
1997  * Word Break constants.
1998  * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.)
1999  *
2000  * @see UCHAR_WORD_BREAK
2001  * @stable ICU 3.4
2002  */
2003 typedef enum UWordBreakValues {
2004     /*
2005      * Note: UWordBreakValues constants are parsed by preparseucd.py.
2006      * It matches lines like
2007      *     U_WB_<Unicode Word_Break value name>
2008      */
2009 
2010     U_WB_OTHER = 0,             /*[XX]*/
2011     U_WB_ALETTER = 1,           /*[LE]*/
2012     U_WB_FORMAT = 2,            /*[FO]*/
2013     U_WB_KATAKANA = 3,          /*[KA]*/
2014     U_WB_MIDLETTER = 4,         /*[ML]*/
2015     U_WB_MIDNUM = 5,            /*[MN]*/
2016     U_WB_NUMERIC = 6,           /*[NU]*/
2017     U_WB_EXTENDNUMLET = 7,      /*[EX]*/
2018     /** @stable ICU 4.0 */
2019     U_WB_CR = 8,                /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */
2020     /** @stable ICU 4.0 */
2021     U_WB_EXTEND = 9,            /*[Extend]*/
2022     /** @stable ICU 4.0 */
2023     U_WB_LF = 10,               /*[LF]*/
2024     /** @stable ICU 4.0 */
2025     U_WB_MIDNUMLET =11,         /*[MB]*/
2026     /** @stable ICU 4.0 */
2027     U_WB_NEWLINE =12,           /*[NL]*/
2028     /** @stable ICU 50 */
2029     U_WB_REGIONAL_INDICATOR = 13,   /*[RI]*/ /* new in Unicode 6.2/ICU 50 */
2030     /** @stable ICU 52 */
2031     U_WB_HEBREW_LETTER = 14,    /*[HL]*/ /* from here on: new in Unicode 6.3/ICU 52 */
2032     /** @stable ICU 52 */
2033     U_WB_SINGLE_QUOTE = 15,     /*[SQ]*/
2034     /** @stable ICU 52 */
2035     U_WB_DOUBLE_QUOTE = 16,     /*[DQ]*/
2036     /** @stable ICU 58 */
2037     U_WB_E_BASE = 17,           /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */
2038     /** @stable ICU 58 */
2039     U_WB_E_BASE_GAZ = 18,       /*[EBG]*/
2040     /** @stable ICU 58 */
2041     U_WB_E_MODIFIER = 19,       /*[EM]*/
2042     /** @stable ICU 58 */
2043     U_WB_GLUE_AFTER_ZWJ = 20,   /*[GAZ]*/
2044     /** @stable ICU 58 */
2045     U_WB_ZWJ = 21,              /*[ZWJ]*/
2046 #ifndef U_HIDE_DEPRECATED_API
2047     /**
2048      * One more than the highest normal UWordBreakValues value.
2049      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_WORD_BREAK).
2050      *
2051      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2052      */
2053     U_WB_COUNT = 22
2054 #endif  // U_HIDE_DEPRECATED_API
2055 } UWordBreakValues;
2056 
2057 /**
2058  * Sentence Break constants.
2059  *
2060  * @see UCHAR_SENTENCE_BREAK
2061  * @stable ICU 3.4
2062  */
2063 typedef enum USentenceBreak {
2064     /*
2065      * Note: USentenceBreak constants are parsed by preparseucd.py.
2066      * It matches lines like
2067      *     U_SB_<Unicode Sentence_Break value name>
2068      */
2069 
2070     U_SB_OTHER = 0,             /*[XX]*/
2071     U_SB_ATERM = 1,             /*[AT]*/
2072     U_SB_CLOSE = 2,             /*[CL]*/
2073     U_SB_FORMAT = 3,            /*[FO]*/
2074     U_SB_LOWER = 4,             /*[LO]*/
2075     U_SB_NUMERIC = 5,           /*[NU]*/
2076     U_SB_OLETTER = 6,           /*[LE]*/
2077     U_SB_SEP = 7,               /*[SE]*/
2078     U_SB_SP = 8,                /*[SP]*/
2079     U_SB_STERM = 9,             /*[ST]*/
2080     U_SB_UPPER = 10,            /*[UP]*/
2081     U_SB_CR = 11,               /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */
2082     U_SB_EXTEND = 12,           /*[EX]*/
2083     U_SB_LF = 13,               /*[LF]*/
2084     U_SB_SCONTINUE = 14,        /*[SC]*/
2085 #ifndef U_HIDE_DEPRECATED_API
2086     /**
2087      * One more than the highest normal USentenceBreak value.
2088      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_SENTENCE_BREAK).
2089      *
2090      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2091      */
2092     U_SB_COUNT = 15
2093 #endif  // U_HIDE_DEPRECATED_API
2094 } USentenceBreak;
2095 
2096 /**
2097  * Line Break constants.
2098  *
2099  * @see UCHAR_LINE_BREAK
2100  * @stable ICU 2.2
2101  */
2102 typedef enum ULineBreak {
2103     /*
2104      * Note: ULineBreak constants are parsed by preparseucd.py.
2105      * It matches lines like
2106      *     U_LB_<Unicode Line_Break value name>
2107      */
2108 
2109     U_LB_UNKNOWN = 0,           /*[XX]*/
2110     U_LB_AMBIGUOUS = 1,         /*[AI]*/
2111     U_LB_ALPHABETIC = 2,        /*[AL]*/
2112     U_LB_BREAK_BOTH = 3,        /*[B2]*/
2113     U_LB_BREAK_AFTER = 4,       /*[BA]*/
2114     U_LB_BREAK_BEFORE = 5,      /*[BB]*/
2115     U_LB_MANDATORY_BREAK = 6,   /*[BK]*/
2116     U_LB_CONTINGENT_BREAK = 7,  /*[CB]*/
2117     U_LB_CLOSE_PUNCTUATION = 8, /*[CL]*/
2118     U_LB_COMBINING_MARK = 9,    /*[CM]*/
2119     U_LB_CARRIAGE_RETURN = 10,   /*[CR]*/
2120     U_LB_EXCLAMATION = 11,       /*[EX]*/
2121     U_LB_GLUE = 12,              /*[GL]*/
2122     U_LB_HYPHEN = 13,            /*[HY]*/
2123     U_LB_IDEOGRAPHIC = 14,       /*[ID]*/
2124     /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0 @stable ICU 3.0 */
2125     U_LB_INSEPARABLE = 15,       /*[IN]*/
2126     U_LB_INSEPERABLE = U_LB_INSEPARABLE,
2127     U_LB_INFIX_NUMERIC = 16,     /*[IS]*/
2128     U_LB_LINE_FEED = 17,         /*[LF]*/
2129     U_LB_NONSTARTER = 18,        /*[NS]*/
2130     U_LB_NUMERIC = 19,           /*[NU]*/
2131     U_LB_OPEN_PUNCTUATION = 20,  /*[OP]*/
2132     U_LB_POSTFIX_NUMERIC = 21,   /*[PO]*/
2133     U_LB_PREFIX_NUMERIC = 22,    /*[PR]*/
2134     U_LB_QUOTATION = 23,         /*[QU]*/
2135     U_LB_COMPLEX_CONTEXT = 24,   /*[SA]*/
2136     U_LB_SURROGATE = 25,         /*[SG]*/
2137     U_LB_SPACE = 26,             /*[SP]*/
2138     U_LB_BREAK_SYMBOLS = 27,     /*[SY]*/
2139     U_LB_ZWSPACE = 28,           /*[ZW]*/
2140     /** @stable ICU 2.6 */
2141     U_LB_NEXT_LINE = 29,         /*[NL]*/ /* from here on: new in Unicode 4/ICU 2.6 */
2142     /** @stable ICU 2.6 */
2143     U_LB_WORD_JOINER = 30,       /*[WJ]*/
2144     /** @stable ICU 3.4 */
2145     U_LB_H2 = 31,                /*[H2]*/ /* from here on: new in Unicode 4.1/ICU 3.4 */
2146     /** @stable ICU 3.4 */
2147     U_LB_H3 = 32,                /*[H3]*/
2148     /** @stable ICU 3.4 */
2149     U_LB_JL = 33,                /*[JL]*/
2150     /** @stable ICU 3.4 */
2151     U_LB_JT = 34,                /*[JT]*/
2152     /** @stable ICU 3.4 */
2153     U_LB_JV = 35,                /*[JV]*/
2154     /** @stable ICU 4.4 */
2155     U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */
2156     /** @stable ICU 49 */
2157     U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/ICU 49 */
2158     /** @stable ICU 49 */
2159     U_LB_HEBREW_LETTER = 38,     /*[HL]*/ /* new in Unicode 6.1/ICU 49 */
2160     /** @stable ICU 50 */
2161     U_LB_REGIONAL_INDICATOR = 39,/*[RI]*/ /* new in Unicode 6.2/ICU 50 */
2162     /** @stable ICU 58 */
2163     U_LB_E_BASE = 40,            /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */
2164     /** @stable ICU 58 */
2165     U_LB_E_MODIFIER = 41,        /*[EM]*/
2166     /** @stable ICU 58 */
2167     U_LB_ZWJ = 42,               /*[ZWJ]*/
2168 #ifndef U_HIDE_DEPRECATED_API
2169     /**
2170      * One more than the highest normal ULineBreak value.
2171      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_LINE_BREAK).
2172      *
2173      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2174      */
2175     U_LB_COUNT = 43
2176 #endif  // U_HIDE_DEPRECATED_API
2177 } ULineBreak;
2178 
2179 /**
2180  * Numeric Type constants.
2181  *
2182  * @see UCHAR_NUMERIC_TYPE
2183  * @stable ICU 2.2
2184  */
2185 typedef enum UNumericType {
2186     /*
2187      * Note: UNumericType constants are parsed by preparseucd.py.
2188      * It matches lines like
2189      *     U_NT_<Unicode Numeric_Type value name>
2190      */
2191 
2192     U_NT_NONE,              /*[None]*/
2193     U_NT_DECIMAL,           /*[de]*/
2194     U_NT_DIGIT,             /*[di]*/
2195     U_NT_NUMERIC,           /*[nu]*/
2196 #ifndef U_HIDE_DEPRECATED_API
2197     /**
2198      * One more than the highest normal UNumericType value.
2199      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_NUMERIC_TYPE).
2200      *
2201      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2202      */
2203     U_NT_COUNT
2204 #endif  // U_HIDE_DEPRECATED_API
2205 } UNumericType;
2206 
2207 /**
2208  * Hangul Syllable Type constants.
2209  *
2210  * @see UCHAR_HANGUL_SYLLABLE_TYPE
2211  * @stable ICU 2.6
2212  */
2213 typedef enum UHangulSyllableType {
2214     /*
2215      * Note: UHangulSyllableType constants are parsed by preparseucd.py.
2216      * It matches lines like
2217      *     U_HST_<Unicode Hangul_Syllable_Type value name>
2218      */
2219 
2220     U_HST_NOT_APPLICABLE,   /*[NA]*/
2221     U_HST_LEADING_JAMO,     /*[L]*/
2222     U_HST_VOWEL_JAMO,       /*[V]*/
2223     U_HST_TRAILING_JAMO,    /*[T]*/
2224     U_HST_LV_SYLLABLE,      /*[LV]*/
2225     U_HST_LVT_SYLLABLE,     /*[LVT]*/
2226 #ifndef U_HIDE_DEPRECATED_API
2227     /**
2228      * One more than the highest normal UHangulSyllableType value.
2229      * The highest value is available via u_getIntPropertyMaxValue(UCHAR_HANGUL_SYLLABLE_TYPE).
2230      *
2231      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2232      */
2233     U_HST_COUNT
2234 #endif  // U_HIDE_DEPRECATED_API
2235 } UHangulSyllableType;
2236 
2237 /**
2238  * Check a binary Unicode property for a code point.
2239  *
2240  * Unicode, especially in version 3.2, defines many more properties than the
2241  * original set in UnicodeData.txt.
2242  *
2243  * The properties APIs are intended to reflect Unicode properties as defined
2244  * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR).
2245  * For details about the properties see http://www.unicode.org/ucd/ .
2246  * For names of Unicode properties see the UCD file PropertyAliases.txt.
2247  *
2248  * Important: If ICU is built with UCD files from Unicode versions below 3.2,
2249  * then properties marked with "new in Unicode 3.2" are not or not fully available.
2250  *
2251  * @param c Code point to test.
2252  * @param which UProperty selector constant, identifies which binary property to check.
2253  *        Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT.
2254  * @return TRUE or FALSE according to the binary Unicode property value for c.
2255  *         Also FALSE if 'which' is out of bounds or if the Unicode version
2256  *         does not have data for the property at all, or not for this code point.
2257  *
2258  * @see UProperty
2259  * @see u_getIntPropertyValue
2260  * @see u_getUnicodeVersion
2261  * @stable ICU 2.1
2262  */
2263 U_STABLE UBool U_EXPORT2
2264 u_hasBinaryProperty(UChar32 c, UProperty which);
2265 
2266 /**
2267  * Check if a code point has the Alphabetic Unicode property.
2268  * Same as u_hasBinaryProperty(c, UCHAR_ALPHABETIC).
2269  * This is different from u_isalpha!
2270  * @param c Code point to test
2271  * @return true if the code point has the Alphabetic Unicode property, false otherwise
2272  *
2273  * @see UCHAR_ALPHABETIC
2274  * @see u_isalpha
2275  * @see u_hasBinaryProperty
2276  * @stable ICU 2.1
2277  */
2278 U_STABLE UBool U_EXPORT2
2279 u_isUAlphabetic(UChar32 c);
2280 
2281 /**
2282  * Check if a code point has the Lowercase Unicode property.
2283  * Same as u_hasBinaryProperty(c, UCHAR_LOWERCASE).
2284  * This is different from u_islower!
2285  * @param c Code point to test
2286  * @return true if the code point has the Lowercase Unicode property, false otherwise
2287  *
2288  * @see UCHAR_LOWERCASE
2289  * @see u_islower
2290  * @see u_hasBinaryProperty
2291  * @stable ICU 2.1
2292  */
2293 U_STABLE UBool U_EXPORT2
2294 u_isULowercase(UChar32 c);
2295 
2296 /**
2297  * Check if a code point has the Uppercase Unicode property.
2298  * Same as u_hasBinaryProperty(c, UCHAR_UPPERCASE).
2299  * This is different from u_isupper!
2300  * @param c Code point to test
2301  * @return true if the code point has the Uppercase Unicode property, false otherwise
2302  *
2303  * @see UCHAR_UPPERCASE
2304  * @see u_isupper
2305  * @see u_hasBinaryProperty
2306  * @stable ICU 2.1
2307  */
2308 U_STABLE UBool U_EXPORT2
2309 u_isUUppercase(UChar32 c);
2310 
2311 /**
2312  * Check if a code point has the White_Space Unicode property.
2313  * Same as u_hasBinaryProperty(c, UCHAR_WHITE_SPACE).
2314  * This is different from both u_isspace and u_isWhitespace!
2315  *
2316  * Note: There are several ICU whitespace functions; please see the uchar.h
2317  * file documentation for a detailed comparison.
2318  *
2319  * @param c Code point to test
2320  * @return true if the code point has the White_Space Unicode property, false otherwise.
2321  *
2322  * @see UCHAR_WHITE_SPACE
2323  * @see u_isWhitespace
2324  * @see u_isspace
2325  * @see u_isJavaSpaceChar
2326  * @see u_hasBinaryProperty
2327  * @stable ICU 2.1
2328  */
2329 U_STABLE UBool U_EXPORT2
2330 u_isUWhiteSpace(UChar32 c);
2331 
2332 /**
2333  * Get the property value for an enumerated or integer Unicode property for a code point.
2334  * Also returns binary and mask property values.
2335  *
2336  * Unicode, especially in version 3.2, defines many more properties than the
2337  * original set in UnicodeData.txt.
2338  *
2339  * The properties APIs are intended to reflect Unicode properties as defined
2340  * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR).
2341  * For details about the properties see http://www.unicode.org/ .
2342  * For names of Unicode properties see the UCD file PropertyAliases.txt.
2343  *
2344  * Sample usage:
2345  * UEastAsianWidth ea=(UEastAsianWidth)u_getIntPropertyValue(c, UCHAR_EAST_ASIAN_WIDTH);
2346  * UBool b=(UBool)u_getIntPropertyValue(c, UCHAR_IDEOGRAPHIC);
2347  *
2348  * @param c Code point to test.
2349  * @param which UProperty selector constant, identifies which property to check.
2350  *        Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
2351  *        or UCHAR_INT_START<=which<UCHAR_INT_LIMIT
2352  *        or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT.
2353  * @return Numeric value that is directly the property value or,
2354  *         for enumerated properties, corresponds to the numeric value of the enumerated
2355  *         constant of the respective property value enumeration type
2356  *         (cast to enum type if necessary).
2357  *         Returns 0 or 1 (for FALSE/TRUE) for binary Unicode properties.
2358  *         Returns a bit-mask for mask properties.
2359  *         Returns 0 if 'which' is out of bounds or if the Unicode version
2360  *         does not have data for the property at all, or not for this code point.
2361  *
2362  * @see UProperty
2363  * @see u_hasBinaryProperty
2364  * @see u_getIntPropertyMinValue
2365  * @see u_getIntPropertyMaxValue
2366  * @see u_getUnicodeVersion
2367  * @stable ICU 2.2
2368  */
2369 U_STABLE int32_t U_EXPORT2
2370 u_getIntPropertyValue(UChar32 c, UProperty which);
2371 
2372 /**
2373  * Get the minimum value for an enumerated/integer/binary Unicode property.
2374  * Can be used together with u_getIntPropertyMaxValue
2375  * to allocate arrays of UnicodeSet or similar.
2376  *
2377  * @param which UProperty selector constant, identifies which binary property to check.
2378  *        Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
2379  *        or UCHAR_INT_START<=which<UCHAR_INT_LIMIT.
2380  * @return Minimum value returned by u_getIntPropertyValue for a Unicode property.
2381  *         0 if the property selector is out of range.
2382  *
2383  * @see UProperty
2384  * @see u_hasBinaryProperty
2385  * @see u_getUnicodeVersion
2386  * @see u_getIntPropertyMaxValue
2387  * @see u_getIntPropertyValue
2388  * @stable ICU 2.2
2389  */
2390 U_STABLE int32_t U_EXPORT2
2391 u_getIntPropertyMinValue(UProperty which);
2392 
2393 /**
2394  * Get the maximum value for an enumerated/integer/binary Unicode property.
2395  * Can be used together with u_getIntPropertyMinValue
2396  * to allocate arrays of UnicodeSet or similar.
2397  *
2398  * Examples for min/max values (for Unicode 3.2):
2399  *
2400  * - UCHAR_BIDI_CLASS:    0/18 (U_LEFT_TO_RIGHT/U_BOUNDARY_NEUTRAL)
2401  * - UCHAR_SCRIPT:        0/45 (USCRIPT_COMMON/USCRIPT_TAGBANWA)
2402  * - UCHAR_IDEOGRAPHIC:   0/1  (FALSE/TRUE)
2403  *
2404  * For undefined UProperty constant values, min/max values will be 0/-1.
2405  *
2406  * @param which UProperty selector constant, identifies which binary property to check.
2407  *        Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
2408  *        or UCHAR_INT_START<=which<UCHAR_INT_LIMIT.
2409  * @return Maximum value returned by u_getIntPropertyValue for a Unicode property.
2410  *         <=0 if the property selector is out of range.
2411  *
2412  * @see UProperty
2413  * @see u_hasBinaryProperty
2414  * @see u_getUnicodeVersion
2415  * @see u_getIntPropertyMaxValue
2416  * @see u_getIntPropertyValue
2417  * @stable ICU 2.2
2418  */
2419 U_STABLE int32_t U_EXPORT2
2420 u_getIntPropertyMaxValue(UProperty which);
2421 
2422 /**
2423  * Get the numeric value for a Unicode code point as defined in the
2424  * Unicode Character Database.
2425  *
2426  * A "double" return type is necessary because
2427  * some numeric values are fractions, negative, or too large for int32_t.
2428  *
2429  * For characters without any numeric values in the Unicode Character Database,
2430  * this function will return U_NO_NUMERIC_VALUE.
2431  * Note: This is different from the Unicode Standard which specifies NaN as the default value.
2432  * (NaN is not available on all platforms.)
2433  *
2434  * Similar to java.lang.Character.getNumericValue(), but u_getNumericValue()
2435  * also supports negative values, large values, and fractions,
2436  * while Java's getNumericValue() returns values 10..35 for ASCII letters.
2437  *
2438  * @param c Code point to get the numeric value for.
2439  * @return Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined.
2440  *
2441  * @see U_NO_NUMERIC_VALUE
2442  * @stable ICU 2.2
2443  */
2444 U_STABLE double U_EXPORT2
2445 u_getNumericValue(UChar32 c);
2446 
2447 /**
2448  * Special value that is returned by u_getNumericValue when
2449  * no numeric value is defined for a code point.
2450  *
2451  * @see u_getNumericValue
2452  * @stable ICU 2.2
2453  */
2454 #define U_NO_NUMERIC_VALUE ((double)-123456789.)
2455 
2456 /**
2457  * Determines whether the specified code point has the general category "Ll"
2458  * (lowercase letter).
2459  *
2460  * Same as java.lang.Character.isLowerCase().
2461  *
2462  * This misses some characters that are also lowercase but
2463  * have a different general category value.
2464  * In order to include those, use UCHAR_LOWERCASE.
2465  *
2466  * In addition to being equivalent to a Java function, this also serves
2467  * as a C/POSIX migration function.
2468  * See the comments about C/POSIX character classification functions in the
2469  * documentation at the top of this header file.
2470  *
2471  * @param c the code point to be tested
2472  * @return TRUE if the code point is an Ll lowercase letter
2473  *
2474  * @see UCHAR_LOWERCASE
2475  * @see u_isupper
2476  * @see u_istitle
2477  * @stable ICU 2.0
2478  */
2479 U_STABLE UBool U_EXPORT2
2480 u_islower(UChar32 c);
2481 
2482 /**
2483  * Determines whether the specified code point has the general category "Lu"
2484  * (uppercase letter).
2485  *
2486  * Same as java.lang.Character.isUpperCase().
2487  *
2488  * This misses some characters that are also uppercase but
2489  * have a different general category value.
2490  * In order to include those, use UCHAR_UPPERCASE.
2491  *
2492  * In addition to being equivalent to a Java function, this also serves
2493  * as a C/POSIX migration function.
2494  * See the comments about C/POSIX character classification functions in the
2495  * documentation at the top of this header file.
2496  *
2497  * @param c the code point to be tested
2498  * @return TRUE if the code point is an Lu uppercase letter
2499  *
2500  * @see UCHAR_UPPERCASE
2501  * @see u_islower
2502  * @see u_istitle
2503  * @see u_tolower
2504  * @stable ICU 2.0
2505  */
2506 U_STABLE UBool U_EXPORT2
2507 u_isupper(UChar32 c);
2508 
2509 /**
2510  * Determines whether the specified code point is a titlecase letter.
2511  * True for general category "Lt" (titlecase letter).
2512  *
2513  * Same as java.lang.Character.isTitleCase().
2514  *
2515  * @param c the code point to be tested
2516  * @return TRUE if the code point is an Lt titlecase letter
2517  *
2518  * @see u_isupper
2519  * @see u_islower
2520  * @see u_totitle
2521  * @stable ICU 2.0
2522  */
2523 U_STABLE UBool U_EXPORT2
2524 u_istitle(UChar32 c);
2525 
2526 /**
2527  * Determines whether the specified code point is a digit character according to Java.
2528  * True for characters with general category "Nd" (decimal digit numbers).
2529  * Beginning with Unicode 4, this is the same as
2530  * testing for the Numeric_Type of Decimal.
2531  *
2532  * Same as java.lang.Character.isDigit().
2533  *
2534  * In addition to being equivalent to a Java function, this also serves
2535  * as a C/POSIX migration function.
2536  * See the comments about C/POSIX character classification functions in the
2537  * documentation at the top of this header file.
2538  *
2539  * @param c the code point to be tested
2540  * @return TRUE if the code point is a digit character according to Character.isDigit()
2541  *
2542  * @stable ICU 2.0
2543  */
2544 U_STABLE UBool U_EXPORT2
2545 u_isdigit(UChar32 c);
2546 
2547 /**
2548  * Determines whether the specified code point is a letter character.
2549  * True for general categories "L" (letters).
2550  *
2551  * Same as java.lang.Character.isLetter().
2552  *
2553  * In addition to being equivalent to a Java function, this also serves
2554  * as a C/POSIX migration function.
2555  * See the comments about C/POSIX character classification functions in the
2556  * documentation at the top of this header file.
2557  *
2558  * @param c the code point to be tested
2559  * @return TRUE if the code point is a letter character
2560  *
2561  * @see u_isdigit
2562  * @see u_isalnum
2563  * @stable ICU 2.0
2564  */
2565 U_STABLE UBool U_EXPORT2
2566 u_isalpha(UChar32 c);
2567 
2568 /**
2569  * Determines whether the specified code point is an alphanumeric character
2570  * (letter or digit) according to Java.
2571  * True for characters with general categories
2572  * "L" (letters) and "Nd" (decimal digit numbers).
2573  *
2574  * Same as java.lang.Character.isLetterOrDigit().
2575  *
2576  * In addition to being equivalent to a Java function, this also serves
2577  * as a C/POSIX migration function.
2578  * See the comments about C/POSIX character classification functions in the
2579  * documentation at the top of this header file.
2580  *
2581  * @param c the code point to be tested
2582  * @return TRUE if the code point is an alphanumeric character according to Character.isLetterOrDigit()
2583  *
2584  * @stable ICU 2.0
2585  */
2586 U_STABLE UBool U_EXPORT2
2587 u_isalnum(UChar32 c);
2588 
2589 /**
2590  * Determines whether the specified code point is a hexadecimal digit.
2591  * This is equivalent to u_digit(c, 16)>=0.
2592  * True for characters with general category "Nd" (decimal digit numbers)
2593  * as well as Latin letters a-f and A-F in both ASCII and Fullwidth ASCII.
2594  * (That is, for letters with code points
2595  * 0041..0046, 0061..0066, FF21..FF26, FF41..FF46.)
2596  *
2597  * In order to narrow the definition of hexadecimal digits to only ASCII
2598  * characters, use (c<=0x7f && u_isxdigit(c)).
2599  *
2600  * This is a C/POSIX migration function.
2601  * See the comments about C/POSIX character classification functions in the
2602  * documentation at the top of this header file.
2603  *
2604  * @param c the code point to be tested
2605  * @return TRUE if the code point is a hexadecimal digit
2606  *
2607  * @stable ICU 2.6
2608  */
2609 U_STABLE UBool U_EXPORT2
2610 u_isxdigit(UChar32 c);
2611 
2612 /**
2613  * Determines whether the specified code point is a punctuation character.
2614  * True for characters with general categories "P" (punctuation).
2615  *
2616  * This is a C/POSIX migration function.
2617  * See the comments about C/POSIX character classification functions in the
2618  * documentation at the top of this header file.
2619  *
2620  * @param c the code point to be tested
2621  * @return TRUE if the code point is a punctuation character
2622  *
2623  * @stable ICU 2.6
2624  */
2625 U_STABLE UBool U_EXPORT2
2626 u_ispunct(UChar32 c);
2627 
2628 /**
2629  * Determines whether the specified code point is a "graphic" character
2630  * (printable, excluding spaces).
2631  * TRUE for all characters except those with general categories
2632  * "Cc" (control codes), "Cf" (format controls), "Cs" (surrogates),
2633  * "Cn" (unassigned), and "Z" (separators).
2634  *
2635  * This is a C/POSIX migration function.
2636  * See the comments about C/POSIX character classification functions in the
2637  * documentation at the top of this header file.
2638  *
2639  * @param c the code point to be tested
2640  * @return TRUE if the code point is a "graphic" character
2641  *
2642  * @stable ICU 2.6
2643  */
2644 U_STABLE UBool U_EXPORT2
2645 u_isgraph(UChar32 c);
2646 
2647 /**
2648  * Determines whether the specified code point is a "blank" or "horizontal space",
2649  * a character that visibly separates words on a line.
2650  * The following are equivalent definitions:
2651  *
2652  * TRUE for Unicode White_Space characters except for "vertical space controls"
2653  * where "vertical space controls" are the following characters:
2654  * U+000A (LF) U+000B (VT) U+000C (FF) U+000D (CR) U+0085 (NEL) U+2028 (LS) U+2029 (PS)
2655  *
2656  * same as
2657  *
2658  * TRUE for U+0009 (TAB) and characters with general category "Zs" (space separators)
2659  * except Zero Width Space (ZWSP, U+200B).
2660  *
2661  * Note: There are several ICU whitespace functions; please see the uchar.h
2662  * file documentation for a detailed comparison.
2663  *
2664  * This is a C/POSIX migration function.
2665  * See the comments about C/POSIX character classification functions in the
2666  * documentation at the top of this header file.
2667  *
2668  * @param c the code point to be tested
2669  * @return TRUE if the code point is a "blank"
2670  *
2671  * @stable ICU 2.6
2672  */
2673 U_STABLE UBool U_EXPORT2
2674 u_isblank(UChar32 c);
2675 
2676 /**
2677  * Determines whether the specified code point is "defined",
2678  * which usually means that it is assigned a character.
2679  * True for general categories other than "Cn" (other, not assigned),
2680  * i.e., true for all code points mentioned in UnicodeData.txt.
2681  *
2682  * Note that non-character code points (e.g., U+FDD0) are not "defined"
2683  * (they are Cn), but surrogate code points are "defined" (Cs).
2684  *
2685  * Same as java.lang.Character.isDefined().
2686  *
2687  * @param c the code point to be tested
2688  * @return TRUE if the code point is assigned a character
2689  *
2690  * @see u_isdigit
2691  * @see u_isalpha
2692  * @see u_isalnum
2693  * @see u_isupper
2694  * @see u_islower
2695  * @see u_istitle
2696  * @stable ICU 2.0
2697  */
2698 U_STABLE UBool U_EXPORT2
2699 u_isdefined(UChar32 c);
2700 
2701 /**
2702  * Determines if the specified character is a space character or not.
2703  *
2704  * Note: There are several ICU whitespace functions; please see the uchar.h
2705  * file documentation for a detailed comparison.
2706  *
2707  * This is a C/POSIX migration function.
2708  * See the comments about C/POSIX character classification functions in the
2709  * documentation at the top of this header file.
2710  *
2711  * @param c    the character to be tested
2712  * @return  true if the character is a space character; false otherwise.
2713  *
2714  * @see u_isJavaSpaceChar
2715  * @see u_isWhitespace
2716  * @see u_isUWhiteSpace
2717  * @stable ICU 2.0
2718  */
2719 U_STABLE UBool U_EXPORT2
2720 u_isspace(UChar32 c);
2721 
2722 /**
2723  * Determine if the specified code point is a space character according to Java.
2724  * True for characters with general categories "Z" (separators),
2725  * which does not include control codes (e.g., TAB or Line Feed).
2726  *
2727  * Same as java.lang.Character.isSpaceChar().
2728  *
2729  * Note: There are several ICU whitespace functions; please see the uchar.h
2730  * file documentation for a detailed comparison.
2731  *
2732  * @param c the code point to be tested
2733  * @return TRUE if the code point is a space character according to Character.isSpaceChar()
2734  *
2735  * @see u_isspace
2736  * @see u_isWhitespace
2737  * @see u_isUWhiteSpace
2738  * @stable ICU 2.6
2739  */
2740 U_STABLE UBool U_EXPORT2
2741 u_isJavaSpaceChar(UChar32 c);
2742 
2743 /**
2744  * Determines if the specified code point is a whitespace character according to Java/ICU.
2745  * A character is considered to be a Java whitespace character if and only
2746  * if it satisfies one of the following criteria:
2747  *
2748  * - It is a Unicode Separator character (categories "Z" = "Zs" or "Zl" or "Zp"), but is not
2749  *      also a non-breaking space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP).
2750  * - It is U+0009 HORIZONTAL TABULATION.
2751  * - It is U+000A LINE FEED.
2752  * - It is U+000B VERTICAL TABULATION.
2753  * - It is U+000C FORM FEED.
2754  * - It is U+000D CARRIAGE RETURN.
2755  * - It is U+001C FILE SEPARATOR.
2756  * - It is U+001D GROUP SEPARATOR.
2757  * - It is U+001E RECORD SEPARATOR.
2758  * - It is U+001F UNIT SEPARATOR.
2759  *
2760  * This API tries to sync with the semantics of Java's
2761  * java.lang.Character.isWhitespace(), but it may not return
2762  * the exact same results because of the Unicode version
2763  * difference.
2764  *
2765  * Note: Unicode 4.0.1 changed U+200B ZERO WIDTH SPACE from a Space Separator (Zs)
2766  * to a Format Control (Cf). Since then, isWhitespace(0x200b) returns false.
2767  * See http://www.unicode.org/versions/Unicode4.0.1/
2768  *
2769  * Note: There are several ICU whitespace functions; please see the uchar.h
2770  * file documentation for a detailed comparison.
2771  *
2772  * @param c the code point to be tested
2773  * @return TRUE if the code point is a whitespace character according to Java/ICU
2774  *
2775  * @see u_isspace
2776  * @see u_isJavaSpaceChar
2777  * @see u_isUWhiteSpace
2778  * @stable ICU 2.0
2779  */
2780 U_STABLE UBool U_EXPORT2
2781 u_isWhitespace(UChar32 c);
2782 
2783 /**
2784  * Determines whether the specified code point is a control character
2785  * (as defined by this function).
2786  * A control character is one of the following:
2787  * - ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f)
2788  * - U_CONTROL_CHAR (Cc)
2789  * - U_FORMAT_CHAR (Cf)
2790  * - U_LINE_SEPARATOR (Zl)
2791  * - U_PARAGRAPH_SEPARATOR (Zp)
2792  *
2793  * This is a C/POSIX migration function.
2794  * See the comments about C/POSIX character classification functions in the
2795  * documentation at the top of this header file.
2796  *
2797  * @param c the code point to be tested
2798  * @return TRUE if the code point is a control character
2799  *
2800  * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
2801  * @see u_isprint
2802  * @stable ICU 2.0
2803  */
2804 U_STABLE UBool U_EXPORT2
2805 u_iscntrl(UChar32 c);
2806 
2807 /**
2808  * Determines whether the specified code point is an ISO control code.
2809  * True for U+0000..U+001f and U+007f..U+009f (general category "Cc").
2810  *
2811  * Same as java.lang.Character.isISOControl().
2812  *
2813  * @param c the code point to be tested
2814  * @return TRUE if the code point is an ISO control code
2815  *
2816  * @see u_iscntrl
2817  * @stable ICU 2.6
2818  */
2819 U_STABLE UBool U_EXPORT2
2820 u_isISOControl(UChar32 c);
2821 
2822 /**
2823  * Determines whether the specified code point is a printable character.
2824  * True for general categories <em>other</em> than "C" (controls).
2825  *
2826  * This is a C/POSIX migration function.
2827  * See the comments about C/POSIX character classification functions in the
2828  * documentation at the top of this header file.
2829  *
2830  * @param c the code point to be tested
2831  * @return TRUE if the code point is a printable character
2832  *
2833  * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
2834  * @see u_iscntrl
2835  * @stable ICU 2.0
2836  */
2837 U_STABLE UBool U_EXPORT2
2838 u_isprint(UChar32 c);
2839 
2840 /**
2841  * Determines whether the specified code point is a base character.
2842  * True for general categories "L" (letters), "N" (numbers),
2843  * "Mc" (spacing combining marks), and "Me" (enclosing marks).
2844  *
2845  * Note that this is different from the Unicode definition in
2846  * chapter 3.5, conformance clause D13,
2847  * which defines base characters to be all characters (not Cn)
2848  * that do not graphically combine with preceding characters (M)
2849  * and that are neither control (Cc) or format (Cf) characters.
2850  *
2851  * @param c the code point to be tested
2852  * @return TRUE if the code point is a base character according to this function
2853  *
2854  * @see u_isalpha
2855  * @see u_isdigit
2856  * @stable ICU 2.0
2857  */
2858 U_STABLE UBool U_EXPORT2
2859 u_isbase(UChar32 c);
2860 
2861 /**
2862  * Returns the bidirectional category value for the code point,
2863  * which is used in the Unicode bidirectional algorithm
2864  * (UAX #9 http://www.unicode.org/reports/tr9/).
2865  * Note that some <em>unassigned</em> code points have bidi values
2866  * of R or AL because they are in blocks that are reserved
2867  * for Right-To-Left scripts.
2868  *
2869  * Same as java.lang.Character.getDirectionality()
2870  *
2871  * @param c the code point to be tested
2872  * @return the bidirectional category (UCharDirection) value
2873  *
2874  * @see UCharDirection
2875  * @stable ICU 2.0
2876  */
2877 U_STABLE UCharDirection U_EXPORT2
2878 u_charDirection(UChar32 c);
2879 
2880 /**
2881  * Determines whether the code point has the Bidi_Mirrored property.
2882  * This property is set for characters that are commonly used in
2883  * Right-To-Left contexts and need to be displayed with a "mirrored"
2884  * glyph.
2885  *
2886  * Same as java.lang.Character.isMirrored().
2887  * Same as UCHAR_BIDI_MIRRORED
2888  *
2889  * @param c the code point to be tested
2890  * @return TRUE if the character has the Bidi_Mirrored property
2891  *
2892  * @see UCHAR_BIDI_MIRRORED
2893  * @stable ICU 2.0
2894  */
2895 U_STABLE UBool U_EXPORT2
2896 u_isMirrored(UChar32 c);
2897 
2898 /**
2899  * Maps the specified character to a "mirror-image" character.
2900  * For characters with the Bidi_Mirrored property, implementations
2901  * sometimes need a "poor man's" mapping to another Unicode
2902  * character (code point) such that the default glyph may serve
2903  * as the mirror-image of the default glyph of the specified
2904  * character. This is useful for text conversion to and from
2905  * codepages with visual order, and for displays without glyph
2906  * selection capabilities.
2907  *
2908  * @param c the code point to be mapped
2909  * @return another Unicode code point that may serve as a mirror-image
2910  *         substitute, or c itself if there is no such mapping or c
2911  *         does not have the Bidi_Mirrored property
2912  *
2913  * @see UCHAR_BIDI_MIRRORED
2914  * @see u_isMirrored
2915  * @stable ICU 2.0
2916  */
2917 U_STABLE UChar32 U_EXPORT2
2918 u_charMirror(UChar32 c);
2919 
2920 /**
2921  * Maps the specified character to its paired bracket character.
2922  * For Bidi_Paired_Bracket_Type!=None, this is the same as u_charMirror().
2923  * Otherwise c itself is returned.
2924  * See http://www.unicode.org/reports/tr9/
2925  *
2926  * @param c the code point to be mapped
2927  * @return the paired bracket code point,
2928  *         or c itself if there is no such mapping
2929  *         (Bidi_Paired_Bracket_Type=None)
2930  *
2931  * @see UCHAR_BIDI_PAIRED_BRACKET
2932  * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE
2933  * @see u_charMirror
2934  * @stable ICU 52
2935  */
2936 U_STABLE UChar32 U_EXPORT2
2937 u_getBidiPairedBracket(UChar32 c);
2938 
2939 /**
2940  * Returns the general category value for the code point.
2941  *
2942  * Same as java.lang.Character.getType().
2943  *
2944  * @param c the code point to be tested
2945  * @return the general category (UCharCategory) value
2946  *
2947  * @see UCharCategory
2948  * @stable ICU 2.0
2949  */
2950 U_STABLE int8_t U_EXPORT2
2951 u_charType(UChar32 c);
2952 
2953 /**
2954  * Get a single-bit bit set for the general category of a character.
2955  * This bit set can be compared bitwise with U_GC_SM_MASK, U_GC_L_MASK, etc.
2956  * Same as U_MASK(u_charType(c)).
2957  *
2958  * @param c the code point to be tested
2959  * @return a single-bit mask corresponding to the general category (UCharCategory) value
2960  *
2961  * @see u_charType
2962  * @see UCharCategory
2963  * @see U_GC_CN_MASK
2964  * @stable ICU 2.1
2965  */
2966 #define U_GET_GC_MASK(c) U_MASK(u_charType(c))
2967 
2968 /**
2969  * Callback from u_enumCharTypes(), is called for each contiguous range
2970  * of code points c (where start<=c<limit)
2971  * with the same Unicode general category ("character type").
2972  *
2973  * The callback function can stop the enumeration by returning FALSE.
2974  *
2975  * @param context an opaque pointer, as passed into utrie_enum()
2976  * @param start the first code point in a contiguous range with value
2977  * @param limit one past the last code point in a contiguous range with value
2978  * @param type the general category for all code points in [start..limit[
2979  * @return FALSE to stop the enumeration
2980  *
2981  * @stable ICU 2.1
2982  * @see UCharCategory
2983  * @see u_enumCharTypes
2984  */
2985 typedef UBool U_CALLCONV
2986 UCharEnumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory type);
2987 
2988 /**
2989  * Enumerate efficiently all code points with their Unicode general categories.
2990  *
2991  * This is useful for building data structures (e.g., UnicodeSet's),
2992  * for enumerating all assigned code points (type!=U_UNASSIGNED), etc.
2993  *
2994  * For each contiguous range of code points with a given general category ("character type"),
2995  * the UCharEnumTypeRange function is called.
2996  * Adjacent ranges have different types.
2997  * The Unicode Standard guarantees that the numeric value of the type is 0..31.
2998  *
2999  * @param enumRange a pointer to a function that is called for each contiguous range
3000  *                  of code points with the same general category
3001  * @param context an opaque pointer that is passed on to the callback function
3002  *
3003  * @stable ICU 2.1
3004  * @see UCharCategory
3005  * @see UCharEnumTypeRange
3006  */
3007 U_STABLE void U_EXPORT2
3008 u_enumCharTypes(UCharEnumTypeRange *enumRange, const void *context);
3009 
3010 #if !UCONFIG_NO_NORMALIZATION
3011 
3012 /**
3013  * Returns the combining class of the code point as specified in UnicodeData.txt.
3014  *
3015  * @param c the code point of the character
3016  * @return the combining class of the character
3017  * @stable ICU 2.0
3018  */
3019 U_STABLE uint8_t U_EXPORT2
3020 u_getCombiningClass(UChar32 c);
3021 
3022 #endif
3023 
3024 /**
3025  * Returns the decimal digit value of a decimal digit character.
3026  * Such characters have the general category "Nd" (decimal digit numbers)
3027  * and a Numeric_Type of Decimal.
3028  *
3029  * Unlike ICU releases before 2.6, no digit values are returned for any
3030  * Han characters because Han number characters are often used with a special
3031  * Chinese-style number format (with characters for powers of 10 in between)
3032  * instead of in decimal-positional notation.
3033  * Unicode 4 explicitly assigns Han number characters the Numeric_Type
3034  * Numeric instead of Decimal.
3035  * See Jitterbug 1483 for more details.
3036  *
3037  * Use u_getIntPropertyValue(c, UCHAR_NUMERIC_TYPE) and u_getNumericValue()
3038  * for complete numeric Unicode properties.
3039  *
3040  * @param c the code point for which to get the decimal digit value
3041  * @return the decimal digit value of c,
3042  *         or -1 if c is not a decimal digit character
3043  *
3044  * @see u_getNumericValue
3045  * @stable ICU 2.0
3046  */
3047 U_STABLE int32_t U_EXPORT2
3048 u_charDigitValue(UChar32 c);
3049 
3050 /**
3051  * Returns the Unicode allocation block that contains the character.
3052  *
3053  * @param c the code point to be tested
3054  * @return the block value (UBlockCode) for c
3055  *
3056  * @see UBlockCode
3057  * @stable ICU 2.0
3058  */
3059 U_STABLE UBlockCode U_EXPORT2
3060 ublock_getCode(UChar32 c);
3061 
3062 /**
3063  * Retrieve the name of a Unicode character.
3064  * Depending on <code>nameChoice</code>, the character name written
3065  * into the buffer is the "modern" name or the name that was defined
3066  * in Unicode version 1.0.
3067  * The name contains only "invariant" characters
3068  * like A-Z, 0-9, space, and '-'.
3069  * Unicode 1.0 names are only retrieved if they are different from the modern
3070  * names and if the data file contains the data for them. gennames may or may
3071  * not be called with a command line option to include 1.0 names in unames.dat.
3072  *
3073  * @param code The character (code point) for which to get the name.
3074  *             It must be <code>0<=code<=0x10ffff</code>.
3075  * @param nameChoice Selector for which name to get.
3076  * @param buffer Destination address for copying the name.
3077  *               The name will always be zero-terminated.
3078  *               If there is no name, then the buffer will be set to the empty string.
3079  * @param bufferLength <code>==sizeof(buffer)</code>
3080  * @param pErrorCode Pointer to a UErrorCode variable;
3081  *        check for <code>U_SUCCESS()</code> after <code>u_charName()</code>
3082  *        returns.
3083  * @return The length of the name, or 0 if there is no name for this character.
3084  *         If the bufferLength is less than or equal to the length, then the buffer
3085  *         contains the truncated name and the returned length indicates the full
3086  *         length of the name.
3087  *         The length does not include the zero-termination.
3088  *
3089  * @see UCharNameChoice
3090  * @see u_charFromName
3091  * @see u_enumCharNames
3092  * @stable ICU 2.0
3093  */
3094 U_STABLE int32_t U_EXPORT2
3095 u_charName(UChar32 code, UCharNameChoice nameChoice,
3096            char *buffer, int32_t bufferLength,
3097            UErrorCode *pErrorCode);
3098 
3099 #ifndef U_HIDE_DEPRECATED_API
3100 /**
3101  * Returns an empty string.
3102  * Used to return the ISO 10646 comment for a character.
3103  * The Unicode ISO_Comment property is deprecated and has no values.
3104  *
3105  * @param c The character (code point) for which to get the ISO comment.
3106  *             It must be <code>0<=c<=0x10ffff</code>.
3107  * @param dest Destination address for copying the comment.
3108  *             The comment will be zero-terminated if possible.
3109  *             If there is no comment, then the buffer will be set to the empty string.
3110  * @param destCapacity <code>==sizeof(dest)</code>
3111  * @param pErrorCode Pointer to a UErrorCode variable;
3112  *        check for <code>U_SUCCESS()</code> after <code>u_getISOComment()</code>
3113  *        returns.
3114  * @return 0
3115  *
3116  * @deprecated ICU 49
3117  */
3118 U_DEPRECATED int32_t U_EXPORT2
3119 u_getISOComment(UChar32 c,
3120                 char *dest, int32_t destCapacity,
3121                 UErrorCode *pErrorCode);
3122 #endif  /* U_HIDE_DEPRECATED_API */
3123 
3124 /**
3125  * Find a Unicode character by its name and return its code point value.
3126  * The name is matched exactly and completely.
3127  * If the name does not correspond to a code point, <i>pErrorCode</i>
3128  * is set to <code>U_INVALID_CHAR_FOUND</code>.
3129  * A Unicode 1.0 name is matched only if it differs from the modern name.
3130  * Unicode names are all uppercase. Extended names are lowercase followed
3131  * by an uppercase hexadecimal number, and within angle brackets.
3132  *
3133  * @param nameChoice Selector for which name to match.
3134  * @param name The name to match.
3135  * @param pErrorCode Pointer to a UErrorCode variable
3136  * @return The Unicode value of the code point with the given name,
3137  *         or an undefined value if there is no such code point.
3138  *
3139  * @see UCharNameChoice
3140  * @see u_charName
3141  * @see u_enumCharNames
3142  * @stable ICU 1.7
3143  */
3144 U_STABLE UChar32 U_EXPORT2
3145 u_charFromName(UCharNameChoice nameChoice,
3146                const char *name,
3147                UErrorCode *pErrorCode);
3148 
3149 /**
3150  * Type of a callback function for u_enumCharNames() that gets called
3151  * for each Unicode character with the code point value and
3152  * the character name.
3153  * If such a function returns FALSE, then the enumeration is stopped.
3154  *
3155  * @param context The context pointer that was passed to u_enumCharNames().
3156  * @param code The Unicode code point for the character with this name.
3157  * @param nameChoice Selector for which kind of names is enumerated.
3158  * @param name The character's name, zero-terminated.
3159  * @param length The length of the name.
3160  * @return TRUE if the enumeration should continue, FALSE to stop it.
3161  *
3162  * @see UCharNameChoice
3163  * @see u_enumCharNames
3164  * @stable ICU 1.7
3165  */
3166 typedef UBool U_CALLCONV UEnumCharNamesFn(void *context,
3167                                UChar32 code,
3168                                UCharNameChoice nameChoice,
3169                                const char *name,
3170                                int32_t length);
3171 
3172 /**
3173  * Enumerate all assigned Unicode characters between the start and limit
3174  * code points (start inclusive, limit exclusive) and call a function
3175  * for each, passing the code point value and the character name.
3176  * For Unicode 1.0 names, only those are enumerated that differ from the
3177  * modern names.
3178  *
3179  * @param start The first code point in the enumeration range.
3180  * @param limit One more than the last code point in the enumeration range
3181  *              (the first one after the range).
3182  * @param fn The function that is to be called for each character name.
3183  * @param context An arbitrary pointer that is passed to the function.
3184  * @param nameChoice Selector for which kind of names to enumerate.
3185  * @param pErrorCode Pointer to a UErrorCode variable
3186  *
3187  * @see UCharNameChoice
3188  * @see UEnumCharNamesFn
3189  * @see u_charName
3190  * @see u_charFromName
3191  * @stable ICU 1.7
3192  */
3193 U_STABLE void U_EXPORT2
3194 u_enumCharNames(UChar32 start, UChar32 limit,
3195                 UEnumCharNamesFn *fn,
3196                 void *context,
3197                 UCharNameChoice nameChoice,
3198                 UErrorCode *pErrorCode);
3199 
3200 /**
3201  * Return the Unicode name for a given property, as given in the
3202  * Unicode database file PropertyAliases.txt.
3203  *
3204  * In addition, this function maps the property
3205  * UCHAR_GENERAL_CATEGORY_MASK to the synthetic names "gcm" /
3206  * "General_Category_Mask".  These names are not in
3207  * PropertyAliases.txt.
3208  *
3209  * @param property UProperty selector other than UCHAR_INVALID_CODE.
3210  *         If out of range, NULL is returned.
3211  *
3212  * @param nameChoice selector for which name to get.  If out of range,
3213  *         NULL is returned.  All properties have a long name.  Most
3214  *         have a short name, but some do not.  Unicode allows for
3215  *         additional names; if present these will be returned by
3216  *         U_LONG_PROPERTY_NAME + i, where i=1, 2,...
3217  *
3218  * @return a pointer to the name, or NULL if either the
3219  *         property or the nameChoice is out of range.  If a given
3220  *         nameChoice returns NULL, then all larger values of
3221  *         nameChoice will return NULL, with one exception: if NULL is
3222  *         returned for U_SHORT_PROPERTY_NAME, then
3223  *         U_LONG_PROPERTY_NAME (and higher) may still return a
3224  *         non-NULL value.  The returned pointer is valid until
3225  *         u_cleanup() is called.
3226  *
3227  * @see UProperty
3228  * @see UPropertyNameChoice
3229  * @stable ICU 2.4
3230  */
3231 U_STABLE const char* U_EXPORT2
3232 u_getPropertyName(UProperty property,
3233                   UPropertyNameChoice nameChoice);
3234 
3235 /**
3236  * Return the UProperty enum for a given property name, as specified
3237  * in the Unicode database file PropertyAliases.txt.  Short, long, and
3238  * any other variants are recognized.
3239  *
3240  * In addition, this function maps the synthetic names "gcm" /
3241  * "General_Category_Mask" to the property
3242  * UCHAR_GENERAL_CATEGORY_MASK.  These names are not in
3243  * PropertyAliases.txt.
3244  *
3245  * @param alias the property name to be matched.  The name is compared
3246  *         using "loose matching" as described in PropertyAliases.txt.
3247  *
3248  * @return a UProperty enum, or UCHAR_INVALID_CODE if the given name
3249  *         does not match any property.
3250  *
3251  * @see UProperty
3252  * @stable ICU 2.4
3253  */
3254 U_STABLE UProperty U_EXPORT2
3255 u_getPropertyEnum(const char* alias);
3256 
3257 /**
3258  * Return the Unicode name for a given property value, as given in the
3259  * Unicode database file PropertyValueAliases.txt.
3260  *
3261  * Note: Some of the names in PropertyValueAliases.txt can only be
3262  * retrieved using UCHAR_GENERAL_CATEGORY_MASK, not
3263  * UCHAR_GENERAL_CATEGORY.  These include: "C" / "Other", "L" /
3264  * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P"
3265  * / "Punctuation", "S" / "Symbol", and "Z" / "Separator".
3266  *
3267  * @param property UProperty selector constant.
3268  *        Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
3269  *        or UCHAR_INT_START<=which<UCHAR_INT_LIMIT
3270  *        or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT.
3271  *        If out of range, NULL is returned.
3272  *
3273  * @param value selector for a value for the given property.  If out
3274  *         of range, NULL is returned.  In general, valid values range
3275  *         from 0 up to some maximum.  There are a few exceptions:
3276  *         (1.) UCHAR_BLOCK values begin at the non-zero value
3277  *         UBLOCK_BASIC_LATIN.  (2.)  UCHAR_CANONICAL_COMBINING_CLASS
3278  *         values are not contiguous and range from 0..240.  (3.)
3279  *         UCHAR_GENERAL_CATEGORY_MASK values are not values of
3280  *         UCharCategory, but rather mask values produced by
3281  *         U_GET_GC_MASK().  This allows grouped categories such as
3282  *         [:L:] to be represented.  Mask values range
3283  *         non-contiguously from 1..U_GC_P_MASK.
3284  *
3285  * @param nameChoice selector for which name to get.  If out of range,
3286  *         NULL is returned.  All values have a long name.  Most have
3287  *         a short name, but some do not.  Unicode allows for
3288  *         additional names; if present these will be returned by
3289  *         U_LONG_PROPERTY_NAME + i, where i=1, 2,...
3290 
3291  * @return a pointer to the name, or NULL if either the
3292  *         property or the nameChoice is out of range.  If a given
3293  *         nameChoice returns NULL, then all larger values of
3294  *         nameChoice will return NULL, with one exception: if NULL is
3295  *         returned for U_SHORT_PROPERTY_NAME, then
3296  *         U_LONG_PROPERTY_NAME (and higher) may still return a
3297  *         non-NULL value.  The returned pointer is valid until
3298  *         u_cleanup() is called.
3299  *
3300  * @see UProperty
3301  * @see UPropertyNameChoice
3302  * @stable ICU 2.4
3303  */
3304 U_STABLE const char* U_EXPORT2
3305 u_getPropertyValueName(UProperty property,
3306                        int32_t value,
3307                        UPropertyNameChoice nameChoice);
3308 
3309 /**
3310  * Return the property value integer for a given value name, as
3311  * specified in the Unicode database file PropertyValueAliases.txt.
3312  * Short, long, and any other variants are recognized.
3313  *
3314  * Note: Some of the names in PropertyValueAliases.txt will only be
3315  * recognized with UCHAR_GENERAL_CATEGORY_MASK, not
3316  * UCHAR_GENERAL_CATEGORY.  These include: "C" / "Other", "L" /
3317  * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P"
3318  * / "Punctuation", "S" / "Symbol", and "Z" / "Separator".
3319  *
3320  * @param property UProperty selector constant.
3321  *        Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
3322  *        or UCHAR_INT_START<=which<UCHAR_INT_LIMIT
3323  *        or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT.
3324  *        If out of range, UCHAR_INVALID_CODE is returned.
3325  *
3326  * @param alias the value name to be matched.  The name is compared
3327  *         using "loose matching" as described in
3328  *         PropertyValueAliases.txt.
3329  *
3330  * @return a value integer or UCHAR_INVALID_CODE if the given name
3331  *         does not match any value of the given property, or if the
3332  *         property is invalid.  Note: UCHAR_GENERAL_CATEGORY_MASK values
3333  *         are not values of UCharCategory, but rather mask values
3334  *         produced by U_GET_GC_MASK().  This allows grouped
3335  *         categories such as [:L:] to be represented.
3336  *
3337  * @see UProperty
3338  * @stable ICU 2.4
3339  */
3340 U_STABLE int32_t U_EXPORT2
3341 u_getPropertyValueEnum(UProperty property,
3342                        const char* alias);
3343 
3344 /**
3345  * Determines if the specified character is permissible as the
3346  * first character in an identifier according to Unicode
3347  * (The Unicode Standard, Version 3.0, chapter 5.16 Identifiers).
3348  * True for characters with general categories "L" (letters) and "Nl" (letter numbers).
3349  *
3350  * Same as java.lang.Character.isUnicodeIdentifierStart().
3351  * Same as UCHAR_ID_START
3352  *
3353  * @param c the code point to be tested
3354  * @return TRUE if the code point may start an identifier
3355  *
3356  * @see UCHAR_ID_START
3357  * @see u_isalpha
3358  * @see u_isIDPart
3359  * @stable ICU 2.0
3360  */
3361 U_STABLE UBool U_EXPORT2
3362 u_isIDStart(UChar32 c);
3363 
3364 /**
3365  * Determines if the specified character is permissible
3366  * in an identifier according to Java.
3367  * True for characters with general categories "L" (letters),
3368  * "Nl" (letter numbers), "Nd" (decimal digits),
3369  * "Mc" and "Mn" (combining marks), "Pc" (connecting punctuation), and
3370  * u_isIDIgnorable(c).
3371  *
3372  * Same as java.lang.Character.isUnicodeIdentifierPart().
3373  * Almost the same as Unicode's ID_Continue (UCHAR_ID_CONTINUE)
3374  * except that Unicode recommends to ignore Cf which is less than
3375  * u_isIDIgnorable(c).
3376  *
3377  * @param c the code point to be tested
3378  * @return TRUE if the code point may occur in an identifier according to Java
3379  *
3380  * @see UCHAR_ID_CONTINUE
3381  * @see u_isIDStart
3382  * @see u_isIDIgnorable
3383  * @stable ICU 2.0
3384  */
3385 U_STABLE UBool U_EXPORT2
3386 u_isIDPart(UChar32 c);
3387 
3388 /**
3389  * Determines if the specified character should be regarded
3390  * as an ignorable character in an identifier,
3391  * according to Java.
3392  * True for characters with general category "Cf" (format controls) as well as
3393  * non-whitespace ISO controls
3394  * (U+0000..U+0008, U+000E..U+001B, U+007F..U+009F).
3395  *
3396  * Same as java.lang.Character.isIdentifierIgnorable().
3397  *
3398  * Note that Unicode just recommends to ignore Cf (format controls).
3399  *
3400  * @param c the code point to be tested
3401  * @return TRUE if the code point is ignorable in identifiers according to Java
3402  *
3403  * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
3404  * @see u_isIDStart
3405  * @see u_isIDPart
3406  * @stable ICU 2.0
3407  */
3408 U_STABLE UBool U_EXPORT2
3409 u_isIDIgnorable(UChar32 c);
3410 
3411 /**
3412  * Determines if the specified character is permissible as the
3413  * first character in a Java identifier.
3414  * In addition to u_isIDStart(c), true for characters with
3415  * general categories "Sc" (currency symbols) and "Pc" (connecting punctuation).
3416  *
3417  * Same as java.lang.Character.isJavaIdentifierStart().
3418  *
3419  * @param c the code point to be tested
3420  * @return TRUE if the code point may start a Java identifier
3421  *
3422  * @see     u_isJavaIDPart
3423  * @see     u_isalpha
3424  * @see     u_isIDStart
3425  * @stable ICU 2.0
3426  */
3427 U_STABLE UBool U_EXPORT2
3428 u_isJavaIDStart(UChar32 c);
3429 
3430 /**
3431  * Determines if the specified character is permissible
3432  * in a Java identifier.
3433  * In addition to u_isIDPart(c), true for characters with
3434  * general category "Sc" (currency symbols).
3435  *
3436  * Same as java.lang.Character.isJavaIdentifierPart().
3437  *
3438  * @param c the code point to be tested
3439  * @return TRUE if the code point may occur in a Java identifier
3440  *
3441  * @see     u_isIDIgnorable
3442  * @see     u_isJavaIDStart
3443  * @see     u_isalpha
3444  * @see     u_isdigit
3445  * @see     u_isIDPart
3446  * @stable ICU 2.0
3447  */
3448 U_STABLE UBool U_EXPORT2
3449 u_isJavaIDPart(UChar32 c);
3450 
3451 /**
3452  * The given character is mapped to its lowercase equivalent according to
3453  * UnicodeData.txt; if the character has no lowercase equivalent, the character
3454  * itself is returned.
3455  *
3456  * Same as java.lang.Character.toLowerCase().
3457  *
3458  * This function only returns the simple, single-code point case mapping.
3459  * Full case mappings should be used whenever possible because they produce
3460  * better results by working on whole strings.
3461  * They take into account the string context and the language and can map
3462  * to a result string with a different length as appropriate.
3463  * Full case mappings are applied by the string case mapping functions,
3464  * see ustring.h and the UnicodeString class.
3465  * See also the User Guide chapter on C/POSIX migration:
3466  * http://icu-project.org/userguide/posix.html#case_mappings
3467  *
3468  * @param c the code point to be mapped
3469  * @return the Simple_Lowercase_Mapping of the code point, if any;
3470  *         otherwise the code point itself.
3471  * @stable ICU 2.0
3472  */
3473 U_STABLE UChar32 U_EXPORT2
3474 u_tolower(UChar32 c);
3475 
3476 /**
3477  * The given character is mapped to its uppercase equivalent according to UnicodeData.txt;
3478  * if the character has no uppercase equivalent, the character itself is
3479  * returned.
3480  *
3481  * Same as java.lang.Character.toUpperCase().
3482  *
3483  * This function only returns the simple, single-code point case mapping.
3484  * Full case mappings should be used whenever possible because they produce
3485  * better results by working on whole strings.
3486  * They take into account the string context and the language and can map
3487  * to a result string with a different length as appropriate.
3488  * Full case mappings are applied by the string case mapping functions,
3489  * see ustring.h and the UnicodeString class.
3490  * See also the User Guide chapter on C/POSIX migration:
3491  * http://icu-project.org/userguide/posix.html#case_mappings
3492  *
3493  * @param c the code point to be mapped
3494  * @return the Simple_Uppercase_Mapping of the code point, if any;
3495  *         otherwise the code point itself.
3496  * @stable ICU 2.0
3497  */
3498 U_STABLE UChar32 U_EXPORT2
3499 u_toupper(UChar32 c);
3500 
3501 /**
3502  * The given character is mapped to its titlecase equivalent
3503  * according to UnicodeData.txt;
3504  * if none is defined, the character itself is returned.
3505  *
3506  * Same as java.lang.Character.toTitleCase().
3507  *
3508  * This function only returns the simple, single-code point case mapping.
3509  * Full case mappings should be used whenever possible because they produce
3510  * better results by working on whole strings.
3511  * They take into account the string context and the language and can map
3512  * to a result string with a different length as appropriate.
3513  * Full case mappings are applied by the string case mapping functions,
3514  * see ustring.h and the UnicodeString class.
3515  * See also the User Guide chapter on C/POSIX migration:
3516  * http://icu-project.org/userguide/posix.html#case_mappings
3517  *
3518  * @param c the code point to be mapped
3519  * @return the Simple_Titlecase_Mapping of the code point, if any;
3520  *         otherwise the code point itself.
3521  * @stable ICU 2.0
3522  */
3523 U_STABLE UChar32 U_EXPORT2
3524 u_totitle(UChar32 c);
3525 
3526 /** Option value for case folding: use default mappings defined in CaseFolding.txt. @stable ICU 2.0 */
3527 #define U_FOLD_CASE_DEFAULT 0
3528 
3529 /**
3530  * Option value for case folding:
3531  *
3532  * Use the modified set of mappings provided in CaseFolding.txt to handle dotted I
3533  * and dotless i appropriately for Turkic languages (tr, az).
3534  *
3535  * Before Unicode 3.2, CaseFolding.txt contains mappings marked with 'I' that
3536  * are to be included for default mappings and
3537  * excluded for the Turkic-specific mappings.
3538  *
3539  * Unicode 3.2 CaseFolding.txt instead contains mappings marked with 'T' that
3540  * are to be excluded for default mappings and
3541  * included for the Turkic-specific mappings.
3542  *
3543  * @stable ICU 2.0
3544  */
3545 #define U_FOLD_CASE_EXCLUDE_SPECIAL_I 1
3546 
3547 /**
3548  * The given character is mapped to its case folding equivalent according to
3549  * UnicodeData.txt and CaseFolding.txt;
3550  * if the character has no case folding equivalent, the character
3551  * itself is returned.
3552  *
3553  * This function only returns the simple, single-code point case mapping.
3554  * Full case mappings should be used whenever possible because they produce
3555  * better results by working on whole strings.
3556  * They take into account the string context and the language and can map
3557  * to a result string with a different length as appropriate.
3558  * Full case mappings are applied by the string case mapping functions,
3559  * see ustring.h and the UnicodeString class.
3560  * See also the User Guide chapter on C/POSIX migration:
3561  * http://icu-project.org/userguide/posix.html#case_mappings
3562  *
3563  * @param c the code point to be mapped
3564  * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I
3565  * @return the Simple_Case_Folding of the code point, if any;
3566  *         otherwise the code point itself.
3567  * @stable ICU 2.0
3568  */
3569 U_STABLE UChar32 U_EXPORT2
3570 u_foldCase(UChar32 c, uint32_t options);
3571 
3572 /**
3573  * Returns the decimal digit value of the code point in the
3574  * specified radix.
3575  *
3576  * If the radix is not in the range <code>2<=radix<=36</code> or if the
3577  * value of <code>c</code> is not a valid digit in the specified
3578  * radix, <code>-1</code> is returned. A character is a valid digit
3579  * if at least one of the following is true:
3580  * <ul>
3581  * <li>The character has a decimal digit value.
3582  *     Such characters have the general category "Nd" (decimal digit numbers)
3583  *     and a Numeric_Type of Decimal.
3584  *     In this case the value is the character's decimal digit value.</li>
3585  * <li>The character is one of the uppercase Latin letters
3586  *     <code>'A'</code> through <code>'Z'</code>.
3587  *     In this case the value is <code>c-'A'+10</code>.</li>
3588  * <li>The character is one of the lowercase Latin letters
3589  *     <code>'a'</code> through <code>'z'</code>.
3590  *     In this case the value is <code>ch-'a'+10</code>.</li>
3591  * <li>Latin letters from both the ASCII range (0061..007A, 0041..005A)
3592  *     as well as from the Fullwidth ASCII range (FF41..FF5A, FF21..FF3A)
3593  *     are recognized.</li>
3594  * </ul>
3595  *
3596  * Same as java.lang.Character.digit().
3597  *
3598  * @param   ch      the code point to be tested.
3599  * @param   radix   the radix.
3600  * @return  the numeric value represented by the character in the
3601  *          specified radix,
3602  *          or -1 if there is no value or if the value exceeds the radix.
3603  *
3604  * @see     UCHAR_NUMERIC_TYPE
3605  * @see     u_forDigit
3606  * @see     u_charDigitValue
3607  * @see     u_isdigit
3608  * @stable ICU 2.0
3609  */
3610 U_STABLE int32_t U_EXPORT2
3611 u_digit(UChar32 ch, int8_t radix);
3612 
3613 /**
3614  * Determines the character representation for a specific digit in
3615  * the specified radix. If the value of <code>radix</code> is not a
3616  * valid radix, or the value of <code>digit</code> is not a valid
3617  * digit in the specified radix, the null character
3618  * (<code>U+0000</code>) is returned.
3619  * <p>
3620  * The <code>radix</code> argument is valid if it is greater than or
3621  * equal to 2 and less than or equal to 36.
3622  * The <code>digit</code> argument is valid if
3623  * <code>0 <= digit < radix</code>.
3624  * <p>
3625  * If the digit is less than 10, then
3626  * <code>'0' + digit</code> is returned. Otherwise, the value
3627  * <code>'a' + digit - 10</code> is returned.
3628  *
3629  * Same as java.lang.Character.forDigit().
3630  *
3631  * @param   digit   the number to convert to a character.
3632  * @param   radix   the radix.
3633  * @return  the <code>char</code> representation of the specified digit
3634  *          in the specified radix.
3635  *
3636  * @see     u_digit
3637  * @see     u_charDigitValue
3638  * @see     u_isdigit
3639  * @stable ICU 2.0
3640  */
3641 U_STABLE UChar32 U_EXPORT2
3642 u_forDigit(int32_t digit, int8_t radix);
3643 
3644 /**
3645  * Get the "age" of the code point.
3646  * The "age" is the Unicode version when the code point was first
3647  * designated (as a non-character or for Private Use)
3648  * or assigned a character.
3649  * This can be useful to avoid emitting code points to receiving
3650  * processes that do not accept newer characters.
3651  * The data is from the UCD file DerivedAge.txt.
3652  *
3653  * @param c The code point.
3654  * @param versionArray The Unicode version number array, to be filled in.
3655  *
3656  * @stable ICU 2.1
3657  */
3658 U_STABLE void U_EXPORT2
3659 u_charAge(UChar32 c, UVersionInfo versionArray);
3660 
3661 /**
3662  * Gets the Unicode version information.
3663  * The version array is filled in with the version information
3664  * for the Unicode standard that is currently used by ICU.
3665  * For example, Unicode version 3.1.1 is represented as an array with
3666  * the values { 3, 1, 1, 0 }.
3667  *
3668  * @param versionArray an output array that will be filled in with
3669  *                     the Unicode version number
3670  * @stable ICU 2.0
3671  */
3672 U_STABLE void U_EXPORT2
3673 u_getUnicodeVersion(UVersionInfo versionArray);
3674 
3675 #if !UCONFIG_NO_NORMALIZATION
3676 /**
3677  * Get the FC_NFKC_Closure property string for a character.
3678  * See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure"
3679  * or for "FNC": http://www.unicode.org/reports/tr15/
3680  *
3681  * @param c The character (code point) for which to get the FC_NFKC_Closure string.
3682  *             It must be <code>0<=c<=0x10ffff</code>.
3683  * @param dest Destination address for copying the string.
3684  *             The string will be zero-terminated if possible.
3685  *             If there is no FC_NFKC_Closure string,
3686  *             then the buffer will be set to the empty string.
3687  * @param destCapacity <code>==sizeof(dest)</code>
3688  * @param pErrorCode Pointer to a UErrorCode variable.
3689  * @return The length of the string, or 0 if there is no FC_NFKC_Closure string for this character.
3690  *         If the destCapacity is less than or equal to the length, then the buffer
3691  *         contains the truncated name and the returned length indicates the full
3692  *         length of the name.
3693  *         The length does not include the zero-termination.
3694  *
3695  * @stable ICU 2.2
3696  */
3697 U_STABLE int32_t U_EXPORT2
3698 u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode);
3699 
3700 #endif
3701 
3702 
3703 U_CDECL_END
3704 
3705 #endif /*_UCHAR*/
3706 /*eof*/
3707