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