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