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