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