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