1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 /* 4 ********************************************************************** 5 * Copyright (C) 1997-2016, International Business Machines 6 * Corporation and others. All Rights Reserved. 7 ********************************************************************** 8 * 9 * File UCHAR.H 10 * 11 * Modification History: 12 * 13 * Date Name Description 14 * 04/02/97 aliu Creation. 15 * 03/29/99 helena Updated for C APIs. 16 * 4/15/99 Madhu Updated for C Implementation and Javadoc 17 * 5/20/99 Madhu Added the function u_getVersion() 18 * 8/19/1999 srl Upgraded scripts to Unicode 3.0 19 * 8/27/1999 schererm UCharDirection constants: U_... 20 * 11/11/1999 weiv added u_isalnum(), cleaned comments 21 * 01/11/2000 helena Renamed u_getVersion to u_getUnicodeVersion(). 22 ****************************************************************************** 23 */ 24 25 #ifndef UCHAR_H 26 #define UCHAR_H 27 28 #include <stdbool.h> 29 #include "unicode/utypes.h" 30 #include "unicode/stringoptions.h" 31 #include "unicode/ucpmap.h" 32 33 #if !defined(USET_DEFINED) && !defined(U_IN_DOXYGEN) 34 35 #define USET_DEFINED 36 37 /** 38 * USet is the C API type corresponding to C++ class UnicodeSet. 39 * It is forward-declared here to avoid including unicode/uset.h file if related 40 * APIs are not used. 41 * 42 * @see ucnv_getUnicodeSet 43 * @stable ICU 2.4 44 */ 45 typedef struct USet USet; 46 47 #endif 48 49 50 U_CDECL_BEGIN 51 52 /*==========================================================================*/ 53 /* Unicode version number */ 54 /*==========================================================================*/ 55 /** 56 * Unicode version number, default for the current ICU version. 57 * The actual Unicode Character Database (UCD) data is stored in uprops.dat 58 * and may be generated from UCD files from a different Unicode version. 59 * Call u_getUnicodeVersion to get the actual Unicode version of the data. 60 * 61 * @see u_getUnicodeVersion 62 * @stable ICU 2.0 63 */ 64 #define U_UNICODE_VERSION "15.1" 65 66 /** 67 * \file 68 * \brief C API: Unicode Properties 69 * 70 * This C API provides low-level access to the Unicode Character Database. 71 * In addition to raw property values, some convenience functions calculate 72 * derived properties, for example for Java-style programming. 73 * 74 * Unicode assigns each code point (not just assigned character) values for 75 * many properties. 76 * Most of them are simple boolean flags, or constants from a small enumerated list. 77 * For some properties, values are strings or other relatively more complex types. 78 * 79 * For more information see 80 * "About the Unicode Character Database" (http://www.unicode.org/ucd/) 81 * and the ICU User Guide chapter on Properties (https://unicode-org.github.io/icu/userguide/strings/properties). 82 * 83 * Many properties are accessible via generic functions that take a UProperty selector. 84 * - u_hasBinaryProperty() returns a binary value (true/false) per property and code point. 85 * - u_getIntPropertyValue() returns an integer value per property and code point. 86 * For each supported enumerated or catalog property, there is 87 * an enum type for all of the property's values, and 88 * u_getIntPropertyValue() returns the numeric values of those constants. 89 * - u_getBinaryPropertySet() returns a set for each ICU-supported binary property with 90 * all code points for which the property is true. 91 * - u_getIntPropertyMap() returns a map for each 92 * ICU-supported enumerated/catalog/int-valued property which 93 * maps all Unicode code points to their values for that property. 94 * 95 * Many functions are designed to match java.lang.Character functions. 96 * See the individual function documentation, 97 * and see the JDK 1.4 java.lang.Character documentation 98 * at http://java.sun.com/j2se/1.4/docs/api/java/lang/Character.html 99 * 100 * There are also functions that provide easy migration from C/POSIX functions 101 * like isblank(). Their use is generally discouraged because the C/POSIX 102 * standards do not define their semantics beyond the ASCII range, which means 103 * that different implementations exhibit very different behavior. 104 * Instead, Unicode properties should be used directly. 105 * 106 * There are also only a few, broad C/POSIX character classes, and they tend 107 * to be used for conflicting purposes. For example, the "isalpha()" class 108 * is sometimes used to determine word boundaries, while a more sophisticated 109 * approach would at least distinguish initial letters from continuation 110 * characters (the latter including combining marks). 111 * (In ICU, BreakIterator is the most sophisticated API for word boundaries.) 112 * Another example: There is no "istitle()" class for titlecase characters. 113 * 114 * ICU 3.4 and later provides API access for all twelve C/POSIX character classes. 115 * ICU implements them according to the Standard Recommendations in 116 * Annex C: Compatibility Properties of UTS #18 Unicode Regular Expressions 117 * (http://www.unicode.org/reports/tr18/#Compatibility_Properties). 118 * 119 * API access for C/POSIX character classes is as follows: 120 * - alpha: u_isUAlphabetic(c) or u_hasBinaryProperty(c, UCHAR_ALPHABETIC) 121 * - lower: u_isULowercase(c) or u_hasBinaryProperty(c, UCHAR_LOWERCASE) 122 * - upper: u_isUUppercase(c) or u_hasBinaryProperty(c, UCHAR_UPPERCASE) 123 * - punct: u_ispunct(c) 124 * - digit: u_isdigit(c) or u_charType(c)==U_DECIMAL_DIGIT_NUMBER 125 * - xdigit: u_isxdigit(c) or u_hasBinaryProperty(c, UCHAR_POSIX_XDIGIT) 126 * - alnum: u_hasBinaryProperty(c, UCHAR_POSIX_ALNUM) 127 * - space: u_isUWhiteSpace(c) or u_hasBinaryProperty(c, UCHAR_WHITE_SPACE) 128 * - blank: u_isblank(c) or u_hasBinaryProperty(c, UCHAR_POSIX_BLANK) 129 * - cntrl: u_charType(c)==U_CONTROL_CHAR 130 * - graph: u_hasBinaryProperty(c, UCHAR_POSIX_GRAPH) 131 * - print: u_hasBinaryProperty(c, UCHAR_POSIX_PRINT) 132 * 133 * Note: Some of the u_isxyz() functions in uchar.h predate, and do not match, 134 * the Standard Recommendations in UTS #18. Instead, they match Java 135 * functions according to their API documentation. 136 * 137 * \htmlonly 138 * The C/POSIX character classes are also available in UnicodeSet patterns, 139 * using patterns like [:graph:] or \p{graph}. 140 * \endhtmlonly 141 * 142 * Note: There are several ICU whitespace functions. 143 * Comparison: 144 * - u_isUWhiteSpace=UCHAR_WHITE_SPACE: Unicode White_Space property; 145 * most of general categories "Z" (separators) + most whitespace ISO controls 146 * (including no-break spaces, but excluding IS1..IS4) 147 * - u_isWhitespace: Java isWhitespace; Z + whitespace ISO controls but excluding no-break spaces 148 * - u_isJavaSpaceChar: Java isSpaceChar; just Z (including no-break spaces) 149 * - u_isspace: Z + whitespace ISO controls (including no-break spaces) 150 * - u_isblank: "horizontal spaces" = TAB + Zs 151 */ 152 153 /** 154 * Constants. 155 */ 156 157 /** The lowest Unicode code point value. Code points are non-negative. @stable ICU 2.0 */ 158 #define UCHAR_MIN_VALUE 0 159 160 /** 161 * The highest Unicode code point value (scalar value) according to 162 * The Unicode Standard. This is a 21-bit value (20.1 bits, rounded up). 163 * For a single character, UChar32 is a simple type that can hold any code point value. 164 * 165 * @see UChar32 166 * @stable ICU 2.0 167 */ 168 #define UCHAR_MAX_VALUE 0x10ffff 169 170 /** 171 * Get a single-bit bit set (a flag) from a bit number 0..31. 172 * @stable ICU 2.1 173 */ 174 #define U_MASK(x) ((uint32_t)1<<(x)) 175 176 /** 177 * Selection constants for Unicode properties. 178 * These constants are used in functions like u_hasBinaryProperty to select 179 * one of the Unicode properties. 180 * 181 * The properties APIs are intended to reflect Unicode properties as defined 182 * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). 183 * 184 * For details about the properties see 185 * UAX #44: Unicode Character Database (http://www.unicode.org/reports/tr44/). 186 * 187 * Important: If ICU is built with UCD files from Unicode versions below, e.g., 3.2, 188 * then properties marked with "new in Unicode 3.2" are not or not fully available. 189 * Check u_getUnicodeVersion to be sure. 190 * 191 * @see u_hasBinaryProperty 192 * @see u_getIntPropertyValue 193 * @see u_getUnicodeVersion 194 * @stable ICU 2.1 195 */ 196 typedef enum UProperty { 197 /* 198 * Note: UProperty constants are parsed by preparseucd.py. 199 * It matches lines like 200 * UCHAR_<Unicode property name>=<integer>, 201 */ 202 203 /* Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that 204 debuggers display UCHAR_ALPHABETIC as the symbolic name for 0, 205 rather than UCHAR_BINARY_START. Likewise for other *_START 206 identifiers. */ 207 208 /** Binary property Alphabetic. Same as u_isUAlphabetic, different from u_isalpha. 209 Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic @stable ICU 2.1 */ 210 UCHAR_ALPHABETIC=0, 211 /** First constant for binary Unicode properties. @stable ICU 2.1 */ 212 UCHAR_BINARY_START=UCHAR_ALPHABETIC, 213 /** Binary property ASCII_Hex_Digit. 0-9 A-F a-f @stable ICU 2.1 */ 214 UCHAR_ASCII_HEX_DIGIT=1, 215 /** Binary property Bidi_Control. 216 Format controls which have specific functions 217 in the Bidi Algorithm. @stable ICU 2.1 */ 218 UCHAR_BIDI_CONTROL=2, 219 /** Binary property Bidi_Mirrored. 220 Characters that may change display in RTL text. 221 Same as u_isMirrored. 222 See Bidi Algorithm, UTR 9. @stable ICU 2.1 */ 223 UCHAR_BIDI_MIRRORED=3, 224 /** Binary property Dash. Variations of dashes. @stable ICU 2.1 */ 225 UCHAR_DASH=4, 226 /** Binary property Default_Ignorable_Code_Point (new in Unicode 3.2). 227 Ignorable in most processing. 228 <2060..206F, FFF0..FFFB, E0000..E0FFF>+Other_Default_Ignorable_Code_Point+(Cf+Cc+Cs-White_Space) @stable ICU 2.1 */ 229 UCHAR_DEFAULT_IGNORABLE_CODE_POINT=5, 230 /** Binary property Deprecated (new in Unicode 3.2). 231 The usage of deprecated characters is strongly discouraged. @stable ICU 2.1 */ 232 UCHAR_DEPRECATED=6, 233 /** Binary property Diacritic. Characters that linguistically modify 234 the meaning of another character to which they apply. @stable ICU 2.1 */ 235 UCHAR_DIACRITIC=7, 236 /** Binary property Extender. 237 Extend the value or shape of a preceding alphabetic character, 238 e.g., length and iteration marks. @stable ICU 2.1 */ 239 UCHAR_EXTENDER=8, 240 /** Binary property Full_Composition_Exclusion. 241 CompositionExclusions.txt+Singleton Decompositions+ 242 Non-Starter Decompositions. @stable ICU 2.1 */ 243 UCHAR_FULL_COMPOSITION_EXCLUSION=9, 244 /** Binary property Grapheme_Base (new in Unicode 3.2). 245 For programmatic determination of grapheme cluster boundaries. 246 [0..10FFFF]-Cc-Cf-Cs-Co-Cn-Zl-Zp-Grapheme_Link-Grapheme_Extend-CGJ @stable ICU 2.1 */ 247 UCHAR_GRAPHEME_BASE=10, 248 /** Binary property Grapheme_Extend (new in Unicode 3.2). 249 For programmatic determination of grapheme cluster boundaries. 250 Me+Mn+Mc+Other_Grapheme_Extend-Grapheme_Link-CGJ @stable ICU 2.1 */ 251 UCHAR_GRAPHEME_EXTEND=11, 252 /** Binary property Grapheme_Link (new in Unicode 3.2). 253 For programmatic determination of grapheme cluster boundaries. @stable ICU 2.1 */ 254 UCHAR_GRAPHEME_LINK=12, 255 /** Binary property Hex_Digit. 256 Characters commonly used for hexadecimal numbers. @stable ICU 2.1 */ 257 UCHAR_HEX_DIGIT=13, 258 /** Binary property Hyphen. Dashes used to mark connections 259 between pieces of words, plus the Katakana middle dot. @stable ICU 2.1 */ 260 UCHAR_HYPHEN=14, 261 /** Binary property ID_Continue. 262 Characters that can continue an identifier. 263 DerivedCoreProperties.txt also says "NOTE: Cf characters should be filtered out." 264 ID_Start+Mn+Mc+Nd+Pc @stable ICU 2.1 */ 265 UCHAR_ID_CONTINUE=15, 266 /** Binary property ID_Start. 267 Characters that can start an identifier. 268 Lu+Ll+Lt+Lm+Lo+Nl @stable ICU 2.1 */ 269 UCHAR_ID_START=16, 270 /** Binary property Ideographic. 271 CJKV ideographs. @stable ICU 2.1 */ 272 UCHAR_IDEOGRAPHIC=17, 273 /** Binary property IDS_Binary_Operator (new in Unicode 3.2). 274 For programmatic determination of 275 Ideographic Description Sequences. @stable ICU 2.1 */ 276 UCHAR_IDS_BINARY_OPERATOR=18, 277 /** Binary property IDS_Trinary_Operator (new in Unicode 3.2). 278 For programmatic determination of 279 Ideographic Description Sequences. @stable ICU 2.1 */ 280 UCHAR_IDS_TRINARY_OPERATOR=19, 281 /** Binary property Join_Control. 282 Format controls for cursive joining and ligation. @stable ICU 2.1 */ 283 UCHAR_JOIN_CONTROL=20, 284 /** Binary property Logical_Order_Exception (new in Unicode 3.2). 285 Characters that do not use logical order and 286 require special handling in most processing. @stable ICU 2.1 */ 287 UCHAR_LOGICAL_ORDER_EXCEPTION=21, 288 /** Binary property Lowercase. Same as u_isULowercase, different from u_islower. 289 Ll+Other_Lowercase @stable ICU 2.1 */ 290 UCHAR_LOWERCASE=22, 291 /** Binary property Math. Sm+Other_Math @stable ICU 2.1 */ 292 UCHAR_MATH=23, 293 /** Binary property Noncharacter_Code_Point. 294 Code points that are explicitly defined as illegal 295 for the encoding of characters. @stable ICU 2.1 */ 296 UCHAR_NONCHARACTER_CODE_POINT=24, 297 /** Binary property Quotation_Mark. @stable ICU 2.1 */ 298 UCHAR_QUOTATION_MARK=25, 299 /** Binary property Radical (new in Unicode 3.2). 300 For programmatic determination of 301 Ideographic Description Sequences. @stable ICU 2.1 */ 302 UCHAR_RADICAL=26, 303 /** Binary property Soft_Dotted (new in Unicode 3.2). 304 Characters with a "soft dot", like i or j. 305 An accent placed on these characters causes 306 the dot to disappear. @stable ICU 2.1 */ 307 UCHAR_SOFT_DOTTED=27, 308 /** Binary property Terminal_Punctuation. 309 Punctuation characters that generally mark 310 the end of textual units. @stable ICU 2.1 */ 311 UCHAR_TERMINAL_PUNCTUATION=28, 312 /** Binary property Unified_Ideograph (new in Unicode 3.2). 313 For programmatic determination of 314 Ideographic Description Sequences. @stable ICU 2.1 */ 315 UCHAR_UNIFIED_IDEOGRAPH=29, 316 /** Binary property Uppercase. Same as u_isUUppercase, different from u_isupper. 317 Lu+Other_Uppercase @stable ICU 2.1 */ 318 UCHAR_UPPERCASE=30, 319 /** Binary property White_Space. 320 Same as u_isUWhiteSpace, different from u_isspace and u_isWhitespace. 321 Space characters+TAB+CR+LF-ZWSP-ZWNBSP @stable ICU 2.1 */ 322 UCHAR_WHITE_SPACE=31, 323 /** Binary property XID_Continue. 324 ID_Continue modified to allow closure under 325 normalization forms NFKC and NFKD. @stable ICU 2.1 */ 326 UCHAR_XID_CONTINUE=32, 327 /** Binary property XID_Start. ID_Start modified to allow 328 closure under normalization forms NFKC and NFKD. @stable ICU 2.1 */ 329 UCHAR_XID_START=33, 330 /** Binary property Case_Sensitive. Either the source of a case 331 mapping or _in_ the target of a case mapping. Not the same as 332 the general category Cased_Letter. @stable ICU 2.6 */ 333 UCHAR_CASE_SENSITIVE=34, 334 /** Binary property STerm (new in Unicode 4.0.1). 335 Sentence Terminal. Used in UAX #29: Text Boundaries 336 (http://www.unicode.org/reports/tr29/) 337 @stable ICU 3.0 */ 338 UCHAR_S_TERM=35, 339 /** Binary property Variation_Selector (new in Unicode 4.0.1). 340 Indicates all those characters that qualify as Variation Selectors. 341 For details on the behavior of these characters, 342 see StandardizedVariants.html and 15.6 Variation Selectors. 343 @stable ICU 3.0 */ 344 UCHAR_VARIATION_SELECTOR=36, 345 /** Binary property NFD_Inert. 346 ICU-specific property for characters that are inert under NFD, 347 i.e., they do not interact with adjacent characters. 348 See the documentation for the Normalizer2 class and the 349 Normalizer2::isInert() method. 350 @stable ICU 3.0 */ 351 UCHAR_NFD_INERT=37, 352 /** Binary property NFKD_Inert. 353 ICU-specific property for characters that are inert under NFKD, 354 i.e., they do not interact with adjacent characters. 355 See the documentation for the Normalizer2 class and the 356 Normalizer2::isInert() method. 357 @stable ICU 3.0 */ 358 UCHAR_NFKD_INERT=38, 359 /** Binary property NFC_Inert. 360 ICU-specific property for characters that are inert under NFC, 361 i.e., they do not interact with adjacent characters. 362 See the documentation for the Normalizer2 class and the 363 Normalizer2::isInert() method. 364 @stable ICU 3.0 */ 365 UCHAR_NFC_INERT=39, 366 /** Binary property NFKC_Inert. 367 ICU-specific property for characters that are inert under NFKC, 368 i.e., they do not interact with adjacent characters. 369 See the documentation for the Normalizer2 class and the 370 Normalizer2::isInert() method. 371 @stable ICU 3.0 */ 372 UCHAR_NFKC_INERT=40, 373 /** Binary Property Segment_Starter. 374 ICU-specific property for characters that are starters in terms of 375 Unicode normalization and combining character sequences. 376 They have ccc=0 and do not occur in non-initial position of the 377 canonical decomposition of any character 378 (like a-umlaut in NFD and a Jamo T in an NFD(Hangul LVT)). 379 ICU uses this property for segmenting a string for generating a set of 380 canonically equivalent strings, e.g. for canonical closure while 381 processing collation tailoring rules. 382 @stable ICU 3.0 */ 383 UCHAR_SEGMENT_STARTER=41, 384 /** Binary property Pattern_Syntax (new in Unicode 4.1). 385 See UAX #31 Identifier and Pattern Syntax 386 (http://www.unicode.org/reports/tr31/) 387 @stable ICU 3.4 */ 388 UCHAR_PATTERN_SYNTAX=42, 389 /** Binary property Pattern_White_Space (new in Unicode 4.1). 390 See UAX #31 Identifier and Pattern Syntax 391 (http://www.unicode.org/reports/tr31/) 392 @stable ICU 3.4 */ 393 UCHAR_PATTERN_WHITE_SPACE=43, 394 /** Binary property alnum (a C/POSIX character class). 395 Implemented according to the UTS #18 Annex C Standard Recommendation. 396 See the uchar.h file documentation. 397 @stable ICU 3.4 */ 398 UCHAR_POSIX_ALNUM=44, 399 /** Binary property blank (a C/POSIX character class). 400 Implemented according to the UTS #18 Annex C Standard Recommendation. 401 See the uchar.h file documentation. 402 @stable ICU 3.4 */ 403 UCHAR_POSIX_BLANK=45, 404 /** Binary property graph (a C/POSIX character class). 405 Implemented according to the UTS #18 Annex C Standard Recommendation. 406 See the uchar.h file documentation. 407 @stable ICU 3.4 */ 408 UCHAR_POSIX_GRAPH=46, 409 /** Binary property print (a C/POSIX character class). 410 Implemented according to the UTS #18 Annex C Standard Recommendation. 411 See the uchar.h file documentation. 412 @stable ICU 3.4 */ 413 UCHAR_POSIX_PRINT=47, 414 /** Binary property xdigit (a C/POSIX character class). 415 Implemented according to the UTS #18 Annex C Standard Recommendation. 416 See the uchar.h file documentation. 417 @stable ICU 3.4 */ 418 UCHAR_POSIX_XDIGIT=48, 419 /** Binary property Cased. For Lowercase, Uppercase and Titlecase characters. @stable ICU 4.4 */ 420 UCHAR_CASED=49, 421 /** Binary property Case_Ignorable. Used in context-sensitive case mappings. @stable ICU 4.4 */ 422 UCHAR_CASE_IGNORABLE=50, 423 /** Binary property Changes_When_Lowercased. @stable ICU 4.4 */ 424 UCHAR_CHANGES_WHEN_LOWERCASED=51, 425 /** Binary property Changes_When_Uppercased. @stable ICU 4.4 */ 426 UCHAR_CHANGES_WHEN_UPPERCASED=52, 427 /** Binary property Changes_When_Titlecased. @stable ICU 4.4 */ 428 UCHAR_CHANGES_WHEN_TITLECASED=53, 429 /** Binary property Changes_When_Casefolded. @stable ICU 4.4 */ 430 UCHAR_CHANGES_WHEN_CASEFOLDED=54, 431 /** Binary property Changes_When_Casemapped. @stable ICU 4.4 */ 432 UCHAR_CHANGES_WHEN_CASEMAPPED=55, 433 /** Binary property Changes_When_NFKC_Casefolded. @stable ICU 4.4 */ 434 UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED=56, 435 /** 436 * Binary property Emoji. 437 * See http://www.unicode.org/reports/tr51/#Emoji_Properties 438 * 439 * @stable ICU 57 440 */ 441 UCHAR_EMOJI=57, 442 /** 443 * Binary property Emoji_Presentation. 444 * See http://www.unicode.org/reports/tr51/#Emoji_Properties 445 * 446 * @stable ICU 57 447 */ 448 UCHAR_EMOJI_PRESENTATION=58, 449 /** 450 * Binary property Emoji_Modifier. 451 * See http://www.unicode.org/reports/tr51/#Emoji_Properties 452 * 453 * @stable ICU 57 454 */ 455 UCHAR_EMOJI_MODIFIER=59, 456 /** 457 * Binary property Emoji_Modifier_Base. 458 * See http://www.unicode.org/reports/tr51/#Emoji_Properties 459 * 460 * @stable ICU 57 461 */ 462 UCHAR_EMOJI_MODIFIER_BASE=60, 463 /** 464 * Binary property Emoji_Component. 465 * See http://www.unicode.org/reports/tr51/#Emoji_Properties 466 * 467 * @stable ICU 60 468 */ 469 UCHAR_EMOJI_COMPONENT=61, 470 /** 471 * Binary property Regional_Indicator. 472 * @stable ICU 60 473 */ 474 UCHAR_REGIONAL_INDICATOR=62, 475 /** 476 * Binary property Prepended_Concatenation_Mark. 477 * @stable ICU 60 478 */ 479 UCHAR_PREPENDED_CONCATENATION_MARK=63, 480 /** 481 * Binary property Extended_Pictographic. 482 * See http://www.unicode.org/reports/tr51/#Emoji_Properties 483 * 484 * @stable ICU 62 485 */ 486 UCHAR_EXTENDED_PICTOGRAPHIC=64, 487 /** 488 * Binary property of strings Basic_Emoji. 489 * See https://www.unicode.org/reports/tr51/#Emoji_Sets 490 * 491 * @stable ICU 70 492 */ 493 UCHAR_BASIC_EMOJI=65, 494 /** 495 * Binary property of strings Emoji_Keycap_Sequence. 496 * See https://www.unicode.org/reports/tr51/#Emoji_Sets 497 * 498 * @stable ICU 70 499 */ 500 UCHAR_EMOJI_KEYCAP_SEQUENCE=66, 501 /** 502 * Binary property of strings RGI_Emoji_Modifier_Sequence. 503 * See https://www.unicode.org/reports/tr51/#Emoji_Sets 504 * 505 * @stable ICU 70 506 */ 507 UCHAR_RGI_EMOJI_MODIFIER_SEQUENCE=67, 508 /** 509 * Binary property of strings RGI_Emoji_Flag_Sequence. 510 * See https://www.unicode.org/reports/tr51/#Emoji_Sets 511 * 512 * @stable ICU 70 513 */ 514 UCHAR_RGI_EMOJI_FLAG_SEQUENCE=68, 515 /** 516 * Binary property of strings RGI_Emoji_Tag_Sequence. 517 * See https://www.unicode.org/reports/tr51/#Emoji_Sets 518 * 519 * @stable ICU 70 520 */ 521 UCHAR_RGI_EMOJI_TAG_SEQUENCE=69, 522 /** 523 * Binary property of strings RGI_Emoji_ZWJ_Sequence. 524 * See https://www.unicode.org/reports/tr51/#Emoji_Sets 525 * 526 * @stable ICU 70 527 */ 528 UCHAR_RGI_EMOJI_ZWJ_SEQUENCE=70, 529 /** 530 * Binary property of strings RGI_Emoji. 531 * See https://www.unicode.org/reports/tr51/#Emoji_Sets 532 * 533 * @stable ICU 70 534 */ 535 UCHAR_RGI_EMOJI=71, 536 #ifndef U_HIDE_DRAFT_API 537 /** 538 * Binary property IDS_Unary_Operator. 539 * For programmatic determination of Ideographic Description Sequences. 540 * 541 * @draft ICU 74 542 */ 543 UCHAR_IDS_UNARY_OPERATOR=72, 544 /** 545 * Binary property ID_Compat_Math_Start. 546 * Used in mathematical identifier profile in UAX #31. 547 * @draft ICU 74 548 */ 549 UCHAR_ID_COMPAT_MATH_START=73, 550 /** 551 * Binary property ID_Compat_Math_Continue. 552 * Used in mathematical identifier profile in UAX #31. 553 * @draft ICU 74 554 */ 555 UCHAR_ID_COMPAT_MATH_CONTINUE=74, 556 #endif // U_HIDE_DRAFT_API 557 #ifndef U_HIDE_DEPRECATED_API 558 /** 559 * One more than the last constant for binary Unicode properties. 560 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 561 */ 562 UCHAR_BINARY_LIMIT=75, 563 #endif // U_HIDE_DEPRECATED_API 564 565 /** Enumerated property Bidi_Class. 566 Same as u_charDirection, returns UCharDirection values. @stable ICU 2.2 */ 567 UCHAR_BIDI_CLASS=0x1000, 568 /** First constant for enumerated/integer Unicode properties. @stable ICU 2.2 */ 569 UCHAR_INT_START=UCHAR_BIDI_CLASS, 570 /** Enumerated property Block. 571 Same as ublock_getCode, returns UBlockCode values. @stable ICU 2.2 */ 572 UCHAR_BLOCK=0x1001, 573 /** Enumerated property Canonical_Combining_Class. 574 Same as u_getCombiningClass, returns 8-bit numeric values. @stable ICU 2.2 */ 575 UCHAR_CANONICAL_COMBINING_CLASS=0x1002, 576 /** Enumerated property Decomposition_Type. 577 Returns UDecompositionType values. @stable ICU 2.2 */ 578 UCHAR_DECOMPOSITION_TYPE=0x1003, 579 /** Enumerated property East_Asian_Width. 580 See http://www.unicode.org/reports/tr11/ 581 Returns UEastAsianWidth values. @stable ICU 2.2 */ 582 UCHAR_EAST_ASIAN_WIDTH=0x1004, 583 /** Enumerated property General_Category. 584 Same as u_charType, returns UCharCategory values. @stable ICU 2.2 */ 585 UCHAR_GENERAL_CATEGORY=0x1005, 586 /** Enumerated property Joining_Group. 587 Returns UJoiningGroup values. @stable ICU 2.2 */ 588 UCHAR_JOINING_GROUP=0x1006, 589 /** Enumerated property Joining_Type. 590 Returns UJoiningType values. @stable ICU 2.2 */ 591 UCHAR_JOINING_TYPE=0x1007, 592 /** Enumerated property Line_Break. 593 Returns ULineBreak values. @stable ICU 2.2 */ 594 UCHAR_LINE_BREAK=0x1008, 595 /** Enumerated property Numeric_Type. 596 Returns UNumericType values. @stable ICU 2.2 */ 597 UCHAR_NUMERIC_TYPE=0x1009, 598 /** Enumerated property Script. 599 Same as uscript_getScript, returns UScriptCode values. @stable ICU 2.2 */ 600 UCHAR_SCRIPT=0x100A, 601 /** Enumerated property Hangul_Syllable_Type, new in Unicode 4. 602 Returns UHangulSyllableType values. @stable ICU 2.6 */ 603 UCHAR_HANGUL_SYLLABLE_TYPE=0x100B, 604 /** Enumerated property NFD_Quick_Check. 605 Returns UNormalizationCheckResult values. @stable ICU 3.0 */ 606 UCHAR_NFD_QUICK_CHECK=0x100C, 607 /** Enumerated property NFKD_Quick_Check. 608 Returns UNormalizationCheckResult values. @stable ICU 3.0 */ 609 UCHAR_NFKD_QUICK_CHECK=0x100D, 610 /** Enumerated property NFC_Quick_Check. 611 Returns UNormalizationCheckResult values. @stable ICU 3.0 */ 612 UCHAR_NFC_QUICK_CHECK=0x100E, 613 /** Enumerated property NFKC_Quick_Check. 614 Returns UNormalizationCheckResult values. @stable ICU 3.0 */ 615 UCHAR_NFKC_QUICK_CHECK=0x100F, 616 /** Enumerated property Lead_Canonical_Combining_Class. 617 ICU-specific property for the ccc of the first code point 618 of the decomposition, or lccc(c)=ccc(NFD(c)[0]). 619 Useful for checking for canonically ordered text; 620 see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD . 621 Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */ 622 UCHAR_LEAD_CANONICAL_COMBINING_CLASS=0x1010, 623 /** Enumerated property Trail_Canonical_Combining_Class. 624 ICU-specific property for the ccc of the last code point 625 of the decomposition, or tccc(c)=ccc(NFD(c)[last]). 626 Useful for checking for canonically ordered text; 627 see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD . 628 Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */ 629 UCHAR_TRAIL_CANONICAL_COMBINING_CLASS=0x1011, 630 /** Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1). 631 Used in UAX #29: Text Boundaries 632 (http://www.unicode.org/reports/tr29/) 633 Returns UGraphemeClusterBreak values. @stable ICU 3.4 */ 634 UCHAR_GRAPHEME_CLUSTER_BREAK=0x1012, 635 /** Enumerated property Sentence_Break (new in Unicode 4.1). 636 Used in UAX #29: Text Boundaries 637 (http://www.unicode.org/reports/tr29/) 638 Returns USentenceBreak values. @stable ICU 3.4 */ 639 UCHAR_SENTENCE_BREAK=0x1013, 640 /** Enumerated property Word_Break (new in Unicode 4.1). 641 Used in UAX #29: Text Boundaries 642 (http://www.unicode.org/reports/tr29/) 643 Returns UWordBreakValues values. @stable ICU 3.4 */ 644 UCHAR_WORD_BREAK=0x1014, 645 /** Enumerated property Bidi_Paired_Bracket_Type (new in Unicode 6.3). 646 Used in UAX #9: Unicode Bidirectional Algorithm 647 (http://www.unicode.org/reports/tr9/) 648 Returns UBidiPairedBracketType values. @stable ICU 52 */ 649 UCHAR_BIDI_PAIRED_BRACKET_TYPE=0x1015, 650 /** 651 * Enumerated property Indic_Positional_Category. 652 * New in Unicode 6.0 as provisional property Indic_Matra_Category; 653 * renamed and changed to informative in Unicode 8.0. 654 * See http://www.unicode.org/reports/tr44/#IndicPositionalCategory.txt 655 * @stable ICU 63 656 */ 657 UCHAR_INDIC_POSITIONAL_CATEGORY=0x1016, 658 /** 659 * Enumerated property Indic_Syllabic_Category. 660 * New in Unicode 6.0 as provisional; informative since Unicode 8.0. 661 * See http://www.unicode.org/reports/tr44/#IndicSyllabicCategory.txt 662 * @stable ICU 63 663 */ 664 UCHAR_INDIC_SYLLABIC_CATEGORY=0x1017, 665 /** 666 * Enumerated property Vertical_Orientation. 667 * Used for UAX #50 Unicode Vertical Text Layout (https://www.unicode.org/reports/tr50/). 668 * New as a UCD property in Unicode 10.0. 669 * @stable ICU 63 670 */ 671 UCHAR_VERTICAL_ORIENTATION=0x1018, 672 #ifndef U_HIDE_DRAFT_API 673 /** 674 * Enumerated property Identifier_Status. 675 * Used for UTS #39 General Security Profile for Identifiers 676 * (https://www.unicode.org/reports/tr39/#General_Security_Profile). 677 * @draft ICU 75 678 */ 679 UCHAR_IDENTIFIER_STATUS=0x1019, 680 #endif // U_HIDE_DRAFT_API 681 #ifndef U_HIDE_DEPRECATED_API 682 /** 683 * One more than the last constant for enumerated/integer Unicode properties. 684 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 685 */ 686 UCHAR_INT_LIMIT=0x101A, 687 #endif // U_HIDE_DEPRECATED_API 688 689 /** Bitmask property General_Category_Mask. 690 This is the General_Category property returned as a bit mask. 691 When used in u_getIntPropertyValue(c), same as U_MASK(u_charType(c)), 692 returns bit masks for UCharCategory values where exactly one bit is set. 693 When used with u_getPropertyValueName() and u_getPropertyValueEnum(), 694 a multi-bit mask is used for sets of categories like "Letters". 695 Mask values should be cast to uint32_t. 696 @stable ICU 2.4 */ 697 UCHAR_GENERAL_CATEGORY_MASK=0x2000, 698 /** First constant for bit-mask Unicode properties. @stable ICU 2.4 */ 699 UCHAR_MASK_START=UCHAR_GENERAL_CATEGORY_MASK, 700 #ifndef U_HIDE_DEPRECATED_API 701 /** 702 * One more than the last constant for bit-mask Unicode properties. 703 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 704 */ 705 UCHAR_MASK_LIMIT=0x2001, 706 #endif // U_HIDE_DEPRECATED_API 707 708 /** Double property Numeric_Value. 709 Corresponds to u_getNumericValue. @stable ICU 2.4 */ 710 UCHAR_NUMERIC_VALUE=0x3000, 711 /** First constant for double Unicode properties. @stable ICU 2.4 */ 712 UCHAR_DOUBLE_START=UCHAR_NUMERIC_VALUE, 713 #ifndef U_HIDE_DEPRECATED_API 714 /** 715 * One more than the last constant for double Unicode properties. 716 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 717 */ 718 UCHAR_DOUBLE_LIMIT=0x3001, 719 #endif // U_HIDE_DEPRECATED_API 720 721 /** String property Age. 722 Corresponds to u_charAge. @stable ICU 2.4 */ 723 UCHAR_AGE=0x4000, 724 /** First constant for string Unicode properties. @stable ICU 2.4 */ 725 UCHAR_STRING_START=UCHAR_AGE, 726 /** String property Bidi_Mirroring_Glyph. 727 Corresponds to u_charMirror. @stable ICU 2.4 */ 728 UCHAR_BIDI_MIRRORING_GLYPH=0x4001, 729 /** String property Case_Folding. 730 Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */ 731 UCHAR_CASE_FOLDING=0x4002, 732 #ifndef U_HIDE_DEPRECATED_API 733 /** Deprecated string property ISO_Comment. 734 Corresponds to u_getISOComment. @deprecated ICU 49 */ 735 UCHAR_ISO_COMMENT=0x4003, 736 #endif /* U_HIDE_DEPRECATED_API */ 737 /** String property Lowercase_Mapping. 738 Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */ 739 UCHAR_LOWERCASE_MAPPING=0x4004, 740 /** String property Name. 741 Corresponds to u_charName. @stable ICU 2.4 */ 742 UCHAR_NAME=0x4005, 743 /** String property Simple_Case_Folding. 744 Corresponds to u_foldCase. @stable ICU 2.4 */ 745 UCHAR_SIMPLE_CASE_FOLDING=0x4006, 746 /** String property Simple_Lowercase_Mapping. 747 Corresponds to u_tolower. @stable ICU 2.4 */ 748 UCHAR_SIMPLE_LOWERCASE_MAPPING=0x4007, 749 /** String property Simple_Titlecase_Mapping. 750 Corresponds to u_totitle. @stable ICU 2.4 */ 751 UCHAR_SIMPLE_TITLECASE_MAPPING=0x4008, 752 /** String property Simple_Uppercase_Mapping. 753 Corresponds to u_toupper. @stable ICU 2.4 */ 754 UCHAR_SIMPLE_UPPERCASE_MAPPING=0x4009, 755 /** String property Titlecase_Mapping. 756 Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */ 757 UCHAR_TITLECASE_MAPPING=0x400A, 758 #ifndef U_HIDE_DEPRECATED_API 759 /** String property Unicode_1_Name. 760 This property is of little practical value. 761 Beginning with ICU 49, ICU APIs return an empty string for this property. 762 Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU 49 */ 763 UCHAR_UNICODE_1_NAME=0x400B, 764 #endif /* U_HIDE_DEPRECATED_API */ 765 /** String property Uppercase_Mapping. 766 Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */ 767 UCHAR_UPPERCASE_MAPPING=0x400C, 768 /** String property Bidi_Paired_Bracket (new in Unicode 6.3). 769 Corresponds to u_getBidiPairedBracket. @stable ICU 52 */ 770 UCHAR_BIDI_PAIRED_BRACKET=0x400D, 771 #ifndef U_HIDE_DEPRECATED_API 772 /** 773 * One more than the last constant for string Unicode properties. 774 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 775 */ 776 UCHAR_STRING_LIMIT=0x400E, 777 #endif // U_HIDE_DEPRECATED_API 778 779 /** Miscellaneous property Script_Extensions (new in Unicode 6.0). 780 Some characters are commonly used in multiple scripts. 781 For more information, see UAX #24: http://www.unicode.org/reports/tr24/. 782 Corresponds to uscript_hasScript and uscript_getScriptExtensions in uscript.h. 783 @stable ICU 4.6 */ 784 UCHAR_SCRIPT_EXTENSIONS=0x7000, 785 /** First constant for Unicode properties with unusual value types. @stable ICU 4.6 */ 786 UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS, 787 #ifndef U_HIDE_DRAFT_API 788 /** 789 * Miscellaneous property Identifier_Type. 790 * Used for UTS #39 General Security Profile for Identifiers 791 * (https://www.unicode.org/reports/tr39/#General_Security_Profile). 792 * 793 * Corresponds to u_hasIDType() and u_getIDTypes(). 794 * 795 * Each code point maps to a <i>set</i> of UIdentifierType values. 796 * 797 * @see u_hasIDType 798 * @see u_getIDTypes 799 * @draft ICU 75 800 */ 801 UCHAR_IDENTIFIER_TYPE=0x7001, 802 #endif // U_HIDE_DRAFT_API 803 #ifndef U_HIDE_DEPRECATED_API 804 /** 805 * One more than the last constant for Unicode properties with unusual value types. 806 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 807 */ 808 UCHAR_OTHER_PROPERTY_LIMIT=0x7002, 809 #endif // U_HIDE_DEPRECATED_API 810 811 /** Represents a nonexistent or invalid property or property value. @stable ICU 2.4 */ 812 UCHAR_INVALID_CODE = -1 813 } UProperty; 814 815 /** 816 * Data for enumerated Unicode general category types. 817 * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html . 818 * @stable ICU 2.0 819 */ 820 typedef enum UCharCategory 821 { 822 /* 823 * Note: UCharCategory constants and their API comments are parsed by preparseucd.py. 824 * It matches pairs of lines like 825 * / ** <Unicode 2-letter General_Category value> comment... * / 826 * U_<[A-Z_]+> = <integer>, 827 */ 828 829 /** Non-category for unassigned and non-character code points. @stable ICU 2.0 */ 830 U_UNASSIGNED = 0, 831 /** Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as U_UNASSIGNED!) @stable ICU 2.0 */ 832 U_GENERAL_OTHER_TYPES = 0, 833 /** Lu @stable ICU 2.0 */ 834 U_UPPERCASE_LETTER = 1, 835 /** Ll @stable ICU 2.0 */ 836 U_LOWERCASE_LETTER = 2, 837 /** Lt @stable ICU 2.0 */ 838 U_TITLECASE_LETTER = 3, 839 /** Lm @stable ICU 2.0 */ 840 U_MODIFIER_LETTER = 4, 841 /** Lo @stable ICU 2.0 */ 842 U_OTHER_LETTER = 5, 843 /** Mn @stable ICU 2.0 */ 844 U_NON_SPACING_MARK = 6, 845 /** Me @stable ICU 2.0 */ 846 U_ENCLOSING_MARK = 7, 847 /** Mc @stable ICU 2.0 */ 848 U_COMBINING_SPACING_MARK = 8, 849 /** Nd @stable ICU 2.0 */ 850 U_DECIMAL_DIGIT_NUMBER = 9, 851 /** Nl @stable ICU 2.0 */ 852 U_LETTER_NUMBER = 10, 853 /** No @stable ICU 2.0 */ 854 U_OTHER_NUMBER = 11, 855 /** Zs @stable ICU 2.0 */ 856 U_SPACE_SEPARATOR = 12, 857 /** Zl @stable ICU 2.0 */ 858 U_LINE_SEPARATOR = 13, 859 /** Zp @stable ICU 2.0 */ 860 U_PARAGRAPH_SEPARATOR = 14, 861 /** Cc @stable ICU 2.0 */ 862 U_CONTROL_CHAR = 15, 863 /** Cf @stable ICU 2.0 */ 864 U_FORMAT_CHAR = 16, 865 /** Co @stable ICU 2.0 */ 866 U_PRIVATE_USE_CHAR = 17, 867 /** Cs @stable ICU 2.0 */ 868 U_SURROGATE = 18, 869 /** Pd @stable ICU 2.0 */ 870 U_DASH_PUNCTUATION = 19, 871 /** Ps @stable ICU 2.0 */ 872 U_START_PUNCTUATION = 20, 873 /** Pe @stable ICU 2.0 */ 874 U_END_PUNCTUATION = 21, 875 /** Pc @stable ICU 2.0 */ 876 U_CONNECTOR_PUNCTUATION = 22, 877 /** Po @stable ICU 2.0 */ 878 U_OTHER_PUNCTUATION = 23, 879 /** Sm @stable ICU 2.0 */ 880 U_MATH_SYMBOL = 24, 881 /** Sc @stable ICU 2.0 */ 882 U_CURRENCY_SYMBOL = 25, 883 /** Sk @stable ICU 2.0 */ 884 U_MODIFIER_SYMBOL = 26, 885 /** So @stable ICU 2.0 */ 886 U_OTHER_SYMBOL = 27, 887 /** Pi @stable ICU 2.0 */ 888 U_INITIAL_PUNCTUATION = 28, 889 /** Pf @stable ICU 2.0 */ 890 U_FINAL_PUNCTUATION = 29, 891 /** 892 * One higher than the last enum UCharCategory constant. 893 * This numeric value is stable (will not change), see 894 * http://www.unicode.org/policies/stability_policy.html#Property_Value 895 * 896 * @stable ICU 2.0 897 */ 898 U_CHAR_CATEGORY_COUNT 899 } UCharCategory; 900 901 /** 902 * U_GC_XX_MASK constants are bit flags corresponding to Unicode 903 * general category values. 904 * For each category, the nth bit is set if the numeric value of the 905 * corresponding UCharCategory constant is n. 906 * 907 * There are also some U_GC_Y_MASK constants for groups of general categories 908 * like L for all letter categories. 909 * 910 * @see u_charType 911 * @see U_GET_GC_MASK 912 * @see UCharCategory 913 * @stable ICU 2.1 914 */ 915 #define U_GC_CN_MASK U_MASK(U_GENERAL_OTHER_TYPES) 916 917 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 918 #define U_GC_LU_MASK U_MASK(U_UPPERCASE_LETTER) 919 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 920 #define U_GC_LL_MASK U_MASK(U_LOWERCASE_LETTER) 921 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 922 #define U_GC_LT_MASK U_MASK(U_TITLECASE_LETTER) 923 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 924 #define U_GC_LM_MASK U_MASK(U_MODIFIER_LETTER) 925 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 926 #define U_GC_LO_MASK U_MASK(U_OTHER_LETTER) 927 928 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 929 #define U_GC_MN_MASK U_MASK(U_NON_SPACING_MARK) 930 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 931 #define U_GC_ME_MASK U_MASK(U_ENCLOSING_MARK) 932 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 933 #define U_GC_MC_MASK U_MASK(U_COMBINING_SPACING_MARK) 934 935 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 936 #define U_GC_ND_MASK U_MASK(U_DECIMAL_DIGIT_NUMBER) 937 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 938 #define U_GC_NL_MASK U_MASK(U_LETTER_NUMBER) 939 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 940 #define U_GC_NO_MASK U_MASK(U_OTHER_NUMBER) 941 942 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 943 #define U_GC_ZS_MASK U_MASK(U_SPACE_SEPARATOR) 944 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 945 #define U_GC_ZL_MASK U_MASK(U_LINE_SEPARATOR) 946 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 947 #define U_GC_ZP_MASK U_MASK(U_PARAGRAPH_SEPARATOR) 948 949 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 950 #define U_GC_CC_MASK U_MASK(U_CONTROL_CHAR) 951 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 952 #define U_GC_CF_MASK U_MASK(U_FORMAT_CHAR) 953 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 954 #define U_GC_CO_MASK U_MASK(U_PRIVATE_USE_CHAR) 955 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 956 #define U_GC_CS_MASK U_MASK(U_SURROGATE) 957 958 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 959 #define U_GC_PD_MASK U_MASK(U_DASH_PUNCTUATION) 960 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 961 #define U_GC_PS_MASK U_MASK(U_START_PUNCTUATION) 962 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 963 #define U_GC_PE_MASK U_MASK(U_END_PUNCTUATION) 964 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 965 #define U_GC_PC_MASK U_MASK(U_CONNECTOR_PUNCTUATION) 966 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 967 #define U_GC_PO_MASK U_MASK(U_OTHER_PUNCTUATION) 968 969 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 970 #define U_GC_SM_MASK U_MASK(U_MATH_SYMBOL) 971 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 972 #define U_GC_SC_MASK U_MASK(U_CURRENCY_SYMBOL) 973 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 974 #define U_GC_SK_MASK U_MASK(U_MODIFIER_SYMBOL) 975 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 976 #define U_GC_SO_MASK U_MASK(U_OTHER_SYMBOL) 977 978 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 979 #define U_GC_PI_MASK U_MASK(U_INITIAL_PUNCTUATION) 980 /** Mask constant for a UCharCategory. @stable ICU 2.1 */ 981 #define U_GC_PF_MASK U_MASK(U_FINAL_PUNCTUATION) 982 983 984 /** Mask constant for multiple UCharCategory bits (L Letters). @stable ICU 2.1 */ 985 #define U_GC_L_MASK \ 986 (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK|U_GC_LM_MASK|U_GC_LO_MASK) 987 988 /** Mask constant for multiple UCharCategory bits (LC Cased Letters). @stable ICU 2.1 */ 989 #define U_GC_LC_MASK \ 990 (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK) 991 992 /** Mask constant for multiple UCharCategory bits (M Marks). @stable ICU 2.1 */ 993 #define U_GC_M_MASK (U_GC_MN_MASK|U_GC_ME_MASK|U_GC_MC_MASK) 994 995 /** Mask constant for multiple UCharCategory bits (N Numbers). @stable ICU 2.1 */ 996 #define U_GC_N_MASK (U_GC_ND_MASK|U_GC_NL_MASK|U_GC_NO_MASK) 997 998 /** Mask constant for multiple UCharCategory bits (Z Separators). @stable ICU 2.1 */ 999 #define U_GC_Z_MASK (U_GC_ZS_MASK|U_GC_ZL_MASK|U_GC_ZP_MASK) 1000 1001 /** Mask constant for multiple UCharCategory bits (C Others). @stable ICU 2.1 */ 1002 #define U_GC_C_MASK \ 1003 (U_GC_CN_MASK|U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CO_MASK|U_GC_CS_MASK) 1004 1005 /** Mask constant for multiple UCharCategory bits (P Punctuation). @stable ICU 2.1 */ 1006 #define U_GC_P_MASK \ 1007 (U_GC_PD_MASK|U_GC_PS_MASK|U_GC_PE_MASK|U_GC_PC_MASK|U_GC_PO_MASK| \ 1008 U_GC_PI_MASK|U_GC_PF_MASK) 1009 1010 /** Mask constant for multiple UCharCategory bits (S Symbols). @stable ICU 2.1 */ 1011 #define U_GC_S_MASK (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK) 1012 1013 /** 1014 * This specifies the language directional property of a character set. 1015 * @stable ICU 2.0 1016 */ 1017 typedef enum UCharDirection { 1018 /* 1019 * Note: UCharDirection constants and their API comments are parsed by preparseucd.py. 1020 * It matches pairs of lines like 1021 * / ** <Unicode 1..3-letter Bidi_Class value> comment... * / 1022 * U_<[A-Z_]+> = <integer>, 1023 */ 1024 1025 /** L @stable ICU 2.0 */ 1026 U_LEFT_TO_RIGHT = 0, 1027 /** R @stable ICU 2.0 */ 1028 U_RIGHT_TO_LEFT = 1, 1029 /** EN @stable ICU 2.0 */ 1030 U_EUROPEAN_NUMBER = 2, 1031 /** ES @stable ICU 2.0 */ 1032 U_EUROPEAN_NUMBER_SEPARATOR = 3, 1033 /** ET @stable ICU 2.0 */ 1034 U_EUROPEAN_NUMBER_TERMINATOR = 4, 1035 /** AN @stable ICU 2.0 */ 1036 U_ARABIC_NUMBER = 5, 1037 /** CS @stable ICU 2.0 */ 1038 U_COMMON_NUMBER_SEPARATOR = 6, 1039 /** B @stable ICU 2.0 */ 1040 U_BLOCK_SEPARATOR = 7, 1041 /** S @stable ICU 2.0 */ 1042 U_SEGMENT_SEPARATOR = 8, 1043 /** WS @stable ICU 2.0 */ 1044 U_WHITE_SPACE_NEUTRAL = 9, 1045 /** ON @stable ICU 2.0 */ 1046 U_OTHER_NEUTRAL = 10, 1047 /** LRE @stable ICU 2.0 */ 1048 U_LEFT_TO_RIGHT_EMBEDDING = 11, 1049 /** LRO @stable ICU 2.0 */ 1050 U_LEFT_TO_RIGHT_OVERRIDE = 12, 1051 /** AL @stable ICU 2.0 */ 1052 U_RIGHT_TO_LEFT_ARABIC = 13, 1053 /** RLE @stable ICU 2.0 */ 1054 U_RIGHT_TO_LEFT_EMBEDDING = 14, 1055 /** RLO @stable ICU 2.0 */ 1056 U_RIGHT_TO_LEFT_OVERRIDE = 15, 1057 /** PDF @stable ICU 2.0 */ 1058 U_POP_DIRECTIONAL_FORMAT = 16, 1059 /** NSM @stable ICU 2.0 */ 1060 U_DIR_NON_SPACING_MARK = 17, 1061 /** BN @stable ICU 2.0 */ 1062 U_BOUNDARY_NEUTRAL = 18, 1063 /** FSI @stable ICU 52 */ 1064 U_FIRST_STRONG_ISOLATE = 19, 1065 /** LRI @stable ICU 52 */ 1066 U_LEFT_TO_RIGHT_ISOLATE = 20, 1067 /** RLI @stable ICU 52 */ 1068 U_RIGHT_TO_LEFT_ISOLATE = 21, 1069 /** PDI @stable ICU 52 */ 1070 U_POP_DIRECTIONAL_ISOLATE = 22, 1071 #ifndef U_HIDE_DEPRECATED_API 1072 /** 1073 * One more than the highest UCharDirection value. 1074 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS). 1075 * 1076 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 1077 */ 1078 U_CHAR_DIRECTION_COUNT 1079 #endif // U_HIDE_DEPRECATED_API 1080 } UCharDirection; 1081 1082 /** 1083 * Bidi Paired Bracket Type constants. 1084 * 1085 * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE 1086 * @stable ICU 52 1087 */ 1088 typedef enum UBidiPairedBracketType { 1089 /* 1090 * Note: UBidiPairedBracketType constants are parsed by preparseucd.py. 1091 * It matches lines like 1092 * U_BPT_<Unicode Bidi_Paired_Bracket_Type value name> 1093 */ 1094 1095 /** Not a paired bracket. @stable ICU 52 */ 1096 U_BPT_NONE, 1097 /** Open paired bracket. @stable ICU 52 */ 1098 U_BPT_OPEN, 1099 /** Close paired bracket. @stable ICU 52 */ 1100 U_BPT_CLOSE, 1101 #ifndef U_HIDE_DEPRECATED_API 1102 /** 1103 * One more than the highest normal UBidiPairedBracketType value. 1104 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BIDI_PAIRED_BRACKET_TYPE). 1105 * 1106 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 1107 */ 1108 U_BPT_COUNT /* 3 */ 1109 #endif // U_HIDE_DEPRECATED_API 1110 } UBidiPairedBracketType; 1111 1112 /** 1113 * Constants for Unicode blocks, see the Unicode Data file Blocks.txt 1114 * @stable ICU 2.0 1115 */ 1116 enum UBlockCode { 1117 /* 1118 * Note: UBlockCode constants are parsed by preparseucd.py. 1119 * It matches lines like 1120 * UBLOCK_<Unicode Block value name> = <integer>, 1121 */ 1122 1123 /** New No_Block value in Unicode 4. @stable ICU 2.6 */ 1124 UBLOCK_NO_BLOCK = 0, /*[none]*/ /* Special range indicating No_Block */ 1125 1126 /** @stable ICU 2.0 */ 1127 UBLOCK_BASIC_LATIN = 1, /*[0000]*/ 1128 1129 /** @stable ICU 2.0 */ 1130 UBLOCK_LATIN_1_SUPPLEMENT=2, /*[0080]*/ 1131 1132 /** @stable ICU 2.0 */ 1133 UBLOCK_LATIN_EXTENDED_A =3, /*[0100]*/ 1134 1135 /** @stable ICU 2.0 */ 1136 UBLOCK_LATIN_EXTENDED_B =4, /*[0180]*/ 1137 1138 /** @stable ICU 2.0 */ 1139 UBLOCK_IPA_EXTENSIONS =5, /*[0250]*/ 1140 1141 /** @stable ICU 2.0 */ 1142 UBLOCK_SPACING_MODIFIER_LETTERS =6, /*[02B0]*/ 1143 1144 /** @stable ICU 2.0 */ 1145 UBLOCK_COMBINING_DIACRITICAL_MARKS =7, /*[0300]*/ 1146 1147 /** 1148 * Unicode 3.2 renames this block to "Greek and Coptic". 1149 * @stable ICU 2.0 1150 */ 1151 UBLOCK_GREEK =8, /*[0370]*/ 1152 1153 /** @stable ICU 2.0 */ 1154 UBLOCK_CYRILLIC =9, /*[0400]*/ 1155 1156 /** @stable ICU 2.0 */ 1157 UBLOCK_ARMENIAN =10, /*[0530]*/ 1158 1159 /** @stable ICU 2.0 */ 1160 UBLOCK_HEBREW =11, /*[0590]*/ 1161 1162 /** @stable ICU 2.0 */ 1163 UBLOCK_ARABIC =12, /*[0600]*/ 1164 1165 /** @stable ICU 2.0 */ 1166 UBLOCK_SYRIAC =13, /*[0700]*/ 1167 1168 /** @stable ICU 2.0 */ 1169 UBLOCK_THAANA =14, /*[0780]*/ 1170 1171 /** @stable ICU 2.0 */ 1172 UBLOCK_DEVANAGARI =15, /*[0900]*/ 1173 1174 /** @stable ICU 2.0 */ 1175 UBLOCK_BENGALI =16, /*[0980]*/ 1176 1177 /** @stable ICU 2.0 */ 1178 UBLOCK_GURMUKHI =17, /*[0A00]*/ 1179 1180 /** @stable ICU 2.0 */ 1181 UBLOCK_GUJARATI =18, /*[0A80]*/ 1182 1183 /** @stable ICU 2.0 */ 1184 UBLOCK_ORIYA =19, /*[0B00]*/ 1185 1186 /** @stable ICU 2.0 */ 1187 UBLOCK_TAMIL =20, /*[0B80]*/ 1188 1189 /** @stable ICU 2.0 */ 1190 UBLOCK_TELUGU =21, /*[0C00]*/ 1191 1192 /** @stable ICU 2.0 */ 1193 UBLOCK_KANNADA =22, /*[0C80]*/ 1194 1195 /** @stable ICU 2.0 */ 1196 UBLOCK_MALAYALAM =23, /*[0D00]*/ 1197 1198 /** @stable ICU 2.0 */ 1199 UBLOCK_SINHALA =24, /*[0D80]*/ 1200 1201 /** @stable ICU 2.0 */ 1202 UBLOCK_THAI =25, /*[0E00]*/ 1203 1204 /** @stable ICU 2.0 */ 1205 UBLOCK_LAO =26, /*[0E80]*/ 1206 1207 /** @stable ICU 2.0 */ 1208 UBLOCK_TIBETAN =27, /*[0F00]*/ 1209 1210 /** @stable ICU 2.0 */ 1211 UBLOCK_MYANMAR =28, /*[1000]*/ 1212 1213 /** @stable ICU 2.0 */ 1214 UBLOCK_GEORGIAN =29, /*[10A0]*/ 1215 1216 /** @stable ICU 2.0 */ 1217 UBLOCK_HANGUL_JAMO =30, /*[1100]*/ 1218 1219 /** @stable ICU 2.0 */ 1220 UBLOCK_ETHIOPIC =31, /*[1200]*/ 1221 1222 /** @stable ICU 2.0 */ 1223 UBLOCK_CHEROKEE =32, /*[13A0]*/ 1224 1225 /** @stable ICU 2.0 */ 1226 UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS =33, /*[1400]*/ 1227 1228 /** @stable ICU 2.0 */ 1229 UBLOCK_OGHAM =34, /*[1680]*/ 1230 1231 /** @stable ICU 2.0 */ 1232 UBLOCK_RUNIC =35, /*[16A0]*/ 1233 1234 /** @stable ICU 2.0 */ 1235 UBLOCK_KHMER =36, /*[1780]*/ 1236 1237 /** @stable ICU 2.0 */ 1238 UBLOCK_MONGOLIAN =37, /*[1800]*/ 1239 1240 /** @stable ICU 2.0 */ 1241 UBLOCK_LATIN_EXTENDED_ADDITIONAL =38, /*[1E00]*/ 1242 1243 /** @stable ICU 2.0 */ 1244 UBLOCK_GREEK_EXTENDED =39, /*[1F00]*/ 1245 1246 /** @stable ICU 2.0 */ 1247 UBLOCK_GENERAL_PUNCTUATION =40, /*[2000]*/ 1248 1249 /** @stable ICU 2.0 */ 1250 UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS =41, /*[2070]*/ 1251 1252 /** @stable ICU 2.0 */ 1253 UBLOCK_CURRENCY_SYMBOLS =42, /*[20A0]*/ 1254 1255 /** 1256 * Unicode 3.2 renames this block to "Combining Diacritical Marks for Symbols". 1257 * @stable ICU 2.0 1258 */ 1259 UBLOCK_COMBINING_MARKS_FOR_SYMBOLS =43, /*[20D0]*/ 1260 1261 /** @stable ICU 2.0 */ 1262 UBLOCK_LETTERLIKE_SYMBOLS =44, /*[2100]*/ 1263 1264 /** @stable ICU 2.0 */ 1265 UBLOCK_NUMBER_FORMS =45, /*[2150]*/ 1266 1267 /** @stable ICU 2.0 */ 1268 UBLOCK_ARROWS =46, /*[2190]*/ 1269 1270 /** @stable ICU 2.0 */ 1271 UBLOCK_MATHEMATICAL_OPERATORS =47, /*[2200]*/ 1272 1273 /** @stable ICU 2.0 */ 1274 UBLOCK_MISCELLANEOUS_TECHNICAL =48, /*[2300]*/ 1275 1276 /** @stable ICU 2.0 */ 1277 UBLOCK_CONTROL_PICTURES =49, /*[2400]*/ 1278 1279 /** @stable ICU 2.0 */ 1280 UBLOCK_OPTICAL_CHARACTER_RECOGNITION =50, /*[2440]*/ 1281 1282 /** @stable ICU 2.0 */ 1283 UBLOCK_ENCLOSED_ALPHANUMERICS =51, /*[2460]*/ 1284 1285 /** @stable ICU 2.0 */ 1286 UBLOCK_BOX_DRAWING =52, /*[2500]*/ 1287 1288 /** @stable ICU 2.0 */ 1289 UBLOCK_BLOCK_ELEMENTS =53, /*[2580]*/ 1290 1291 /** @stable ICU 2.0 */ 1292 UBLOCK_GEOMETRIC_SHAPES =54, /*[25A0]*/ 1293 1294 /** @stable ICU 2.0 */ 1295 UBLOCK_MISCELLANEOUS_SYMBOLS =55, /*[2600]*/ 1296 1297 /** @stable ICU 2.0 */ 1298 UBLOCK_DINGBATS =56, /*[2700]*/ 1299 1300 /** @stable ICU 2.0 */ 1301 UBLOCK_BRAILLE_PATTERNS =57, /*[2800]*/ 1302 1303 /** @stable ICU 2.0 */ 1304 UBLOCK_CJK_RADICALS_SUPPLEMENT =58, /*[2E80]*/ 1305 1306 /** @stable ICU 2.0 */ 1307 UBLOCK_KANGXI_RADICALS =59, /*[2F00]*/ 1308 1309 /** @stable ICU 2.0 */ 1310 UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS =60, /*[2FF0]*/ 1311 1312 /** @stable ICU 2.0 */ 1313 UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION =61, /*[3000]*/ 1314 1315 /** @stable ICU 2.0 */ 1316 UBLOCK_HIRAGANA =62, /*[3040]*/ 1317 1318 /** @stable ICU 2.0 */ 1319 UBLOCK_KATAKANA =63, /*[30A0]*/ 1320 1321 /** @stable ICU 2.0 */ 1322 UBLOCK_BOPOMOFO =64, /*[3100]*/ 1323 1324 /** @stable ICU 2.0 */ 1325 UBLOCK_HANGUL_COMPATIBILITY_JAMO =65, /*[3130]*/ 1326 1327 /** @stable ICU 2.0 */ 1328 UBLOCK_KANBUN =66, /*[3190]*/ 1329 1330 /** @stable ICU 2.0 */ 1331 UBLOCK_BOPOMOFO_EXTENDED =67, /*[31A0]*/ 1332 1333 /** @stable ICU 2.0 */ 1334 UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS =68, /*[3200]*/ 1335 1336 /** @stable ICU 2.0 */ 1337 UBLOCK_CJK_COMPATIBILITY =69, /*[3300]*/ 1338 1339 /** @stable ICU 2.0 */ 1340 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A =70, /*[3400]*/ 1341 1342 /** @stable ICU 2.0 */ 1343 UBLOCK_CJK_UNIFIED_IDEOGRAPHS =71, /*[4E00]*/ 1344 1345 /** @stable ICU 2.0 */ 1346 UBLOCK_YI_SYLLABLES =72, /*[A000]*/ 1347 1348 /** @stable ICU 2.0 */ 1349 UBLOCK_YI_RADICALS =73, /*[A490]*/ 1350 1351 /** @stable ICU 2.0 */ 1352 UBLOCK_HANGUL_SYLLABLES =74, /*[AC00]*/ 1353 1354 /** @stable ICU 2.0 */ 1355 UBLOCK_HIGH_SURROGATES =75, /*[D800]*/ 1356 1357 /** @stable ICU 2.0 */ 1358 UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, /*[DB80]*/ 1359 1360 /** @stable ICU 2.0 */ 1361 UBLOCK_LOW_SURROGATES =77, /*[DC00]*/ 1362 1363 /** 1364 * Same as UBLOCK_PRIVATE_USE. 1365 * Until Unicode 3.1.1, the corresponding block name was "Private Use", 1366 * and multiple code point ranges had this block. 1367 * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and 1368 * adds separate blocks for the supplementary PUAs. 1369 * 1370 * @stable ICU 2.0 1371 */ 1372 UBLOCK_PRIVATE_USE_AREA =78, /*[E000]*/ 1373 /** 1374 * Same as UBLOCK_PRIVATE_USE_AREA. 1375 * Until Unicode 3.1.1, the corresponding block name was "Private Use", 1376 * and multiple code point ranges had this block. 1377 * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and 1378 * adds separate blocks for the supplementary PUAs. 1379 * 1380 * @stable ICU 2.0 1381 */ 1382 UBLOCK_PRIVATE_USE = UBLOCK_PRIVATE_USE_AREA, 1383 1384 /** @stable ICU 2.0 */ 1385 UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, /*[F900]*/ 1386 1387 /** @stable ICU 2.0 */ 1388 UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, /*[FB00]*/ 1389 1390 /** @stable ICU 2.0 */ 1391 UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, /*[FB50]*/ 1392 1393 /** @stable ICU 2.0 */ 1394 UBLOCK_COMBINING_HALF_MARKS =82, /*[FE20]*/ 1395 1396 /** @stable ICU 2.0 */ 1397 UBLOCK_CJK_COMPATIBILITY_FORMS =83, /*[FE30]*/ 1398 1399 /** @stable ICU 2.0 */ 1400 UBLOCK_SMALL_FORM_VARIANTS =84, /*[FE50]*/ 1401 1402 /** @stable ICU 2.0 */ 1403 UBLOCK_ARABIC_PRESENTATION_FORMS_B =85, /*[FE70]*/ 1404 1405 /** @stable ICU 2.0 */ 1406 UBLOCK_SPECIALS =86, /*[FFF0]*/ 1407 1408 /** @stable ICU 2.0 */ 1409 UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, /*[FF00]*/ 1410 1411 /* New blocks in Unicode 3.1 */ 1412 1413 /** @stable ICU 2.0 */ 1414 UBLOCK_OLD_ITALIC = 88, /*[10300]*/ 1415 /** @stable ICU 2.0 */ 1416 UBLOCK_GOTHIC = 89, /*[10330]*/ 1417 /** @stable ICU 2.0 */ 1418 UBLOCK_DESERET = 90, /*[10400]*/ 1419 /** @stable ICU 2.0 */ 1420 UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91, /*[1D000]*/ 1421 /** @stable ICU 2.0 */ 1422 UBLOCK_MUSICAL_SYMBOLS = 92, /*[1D100]*/ 1423 /** @stable ICU 2.0 */ 1424 UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93, /*[1D400]*/ 1425 /** @stable ICU 2.0 */ 1426 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94, /*[20000]*/ 1427 /** @stable ICU 2.0 */ 1428 UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95, /*[2F800]*/ 1429 /** @stable ICU 2.0 */ 1430 UBLOCK_TAGS = 96, /*[E0000]*/ 1431 1432 /* New blocks in Unicode 3.2 */ 1433 1434 /** @stable ICU 3.0 */ 1435 UBLOCK_CYRILLIC_SUPPLEMENT = 97, /*[0500]*/ 1436 /** 1437 * Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrillic Supplement". 1438 * @stable ICU 2.2 1439 */ 1440 UBLOCK_CYRILLIC_SUPPLEMENTARY = UBLOCK_CYRILLIC_SUPPLEMENT, 1441 /** @stable ICU 2.2 */ 1442 UBLOCK_TAGALOG = 98, /*[1700]*/ 1443 /** @stable ICU 2.2 */ 1444 UBLOCK_HANUNOO = 99, /*[1720]*/ 1445 /** @stable ICU 2.2 */ 1446 UBLOCK_BUHID = 100, /*[1740]*/ 1447 /** @stable ICU 2.2 */ 1448 UBLOCK_TAGBANWA = 101, /*[1760]*/ 1449 /** @stable ICU 2.2 */ 1450 UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, /*[27C0]*/ 1451 /** @stable ICU 2.2 */ 1452 UBLOCK_SUPPLEMENTAL_ARROWS_A = 103, /*[27F0]*/ 1453 /** @stable ICU 2.2 */ 1454 UBLOCK_SUPPLEMENTAL_ARROWS_B = 104, /*[2900]*/ 1455 /** @stable ICU 2.2 */ 1456 UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = 105, /*[2980]*/ 1457 /** @stable ICU 2.2 */ 1458 UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS = 106, /*[2A00]*/ 1459 /** @stable ICU 2.2 */ 1460 UBLOCK_KATAKANA_PHONETIC_EXTENSIONS = 107, /*[31F0]*/ 1461 /** @stable ICU 2.2 */ 1462 UBLOCK_VARIATION_SELECTORS = 108, /*[FE00]*/ 1463 /** @stable ICU 2.2 */ 1464 UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A = 109, /*[F0000]*/ 1465 /** @stable ICU 2.2 */ 1466 UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B = 110, /*[100000]*/ 1467 1468 /* New blocks in Unicode 4 */ 1469 1470 /** @stable ICU 2.6 */ 1471 UBLOCK_LIMBU = 111, /*[1900]*/ 1472 /** @stable ICU 2.6 */ 1473 UBLOCK_TAI_LE = 112, /*[1950]*/ 1474 /** @stable ICU 2.6 */ 1475 UBLOCK_KHMER_SYMBOLS = 113, /*[19E0]*/ 1476 /** @stable ICU 2.6 */ 1477 UBLOCK_PHONETIC_EXTENSIONS = 114, /*[1D00]*/ 1478 /** @stable ICU 2.6 */ 1479 UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS = 115, /*[2B00]*/ 1480 /** @stable ICU 2.6 */ 1481 UBLOCK_YIJING_HEXAGRAM_SYMBOLS = 116, /*[4DC0]*/ 1482 /** @stable ICU 2.6 */ 1483 UBLOCK_LINEAR_B_SYLLABARY = 117, /*[10000]*/ 1484 /** @stable ICU 2.6 */ 1485 UBLOCK_LINEAR_B_IDEOGRAMS = 118, /*[10080]*/ 1486 /** @stable ICU 2.6 */ 1487 UBLOCK_AEGEAN_NUMBERS = 119, /*[10100]*/ 1488 /** @stable ICU 2.6 */ 1489 UBLOCK_UGARITIC = 120, /*[10380]*/ 1490 /** @stable ICU 2.6 */ 1491 UBLOCK_SHAVIAN = 121, /*[10450]*/ 1492 /** @stable ICU 2.6 */ 1493 UBLOCK_OSMANYA = 122, /*[10480]*/ 1494 /** @stable ICU 2.6 */ 1495 UBLOCK_CYPRIOT_SYLLABARY = 123, /*[10800]*/ 1496 /** @stable ICU 2.6 */ 1497 UBLOCK_TAI_XUAN_JING_SYMBOLS = 124, /*[1D300]*/ 1498 /** @stable ICU 2.6 */ 1499 UBLOCK_VARIATION_SELECTORS_SUPPLEMENT = 125, /*[E0100]*/ 1500 1501 /* New blocks in Unicode 4.1 */ 1502 1503 /** @stable ICU 3.4 */ 1504 UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION = 126, /*[1D200]*/ 1505 /** @stable ICU 3.4 */ 1506 UBLOCK_ANCIENT_GREEK_NUMBERS = 127, /*[10140]*/ 1507 /** @stable ICU 3.4 */ 1508 UBLOCK_ARABIC_SUPPLEMENT = 128, /*[0750]*/ 1509 /** @stable ICU 3.4 */ 1510 UBLOCK_BUGINESE = 129, /*[1A00]*/ 1511 /** @stable ICU 3.4 */ 1512 UBLOCK_CJK_STROKES = 130, /*[31C0]*/ 1513 /** @stable ICU 3.4 */ 1514 UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = 131, /*[1DC0]*/ 1515 /** @stable ICU 3.4 */ 1516 UBLOCK_COPTIC = 132, /*[2C80]*/ 1517 /** @stable ICU 3.4 */ 1518 UBLOCK_ETHIOPIC_EXTENDED = 133, /*[2D80]*/ 1519 /** @stable ICU 3.4 */ 1520 UBLOCK_ETHIOPIC_SUPPLEMENT = 134, /*[1380]*/ 1521 /** @stable ICU 3.4 */ 1522 UBLOCK_GEORGIAN_SUPPLEMENT = 135, /*[2D00]*/ 1523 /** @stable ICU 3.4 */ 1524 UBLOCK_GLAGOLITIC = 136, /*[2C00]*/ 1525 /** @stable ICU 3.4 */ 1526 UBLOCK_KHAROSHTHI = 137, /*[10A00]*/ 1527 /** @stable ICU 3.4 */ 1528 UBLOCK_MODIFIER_TONE_LETTERS = 138, /*[A700]*/ 1529 /** @stable ICU 3.4 */ 1530 UBLOCK_NEW_TAI_LUE = 139, /*[1980]*/ 1531 /** @stable ICU 3.4 */ 1532 UBLOCK_OLD_PERSIAN = 140, /*[103A0]*/ 1533 /** @stable ICU 3.4 */ 1534 UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT = 141, /*[1D80]*/ 1535 /** @stable ICU 3.4 */ 1536 UBLOCK_SUPPLEMENTAL_PUNCTUATION = 142, /*[2E00]*/ 1537 /** @stable ICU 3.4 */ 1538 UBLOCK_SYLOTI_NAGRI = 143, /*[A800]*/ 1539 /** @stable ICU 3.4 */ 1540 UBLOCK_TIFINAGH = 144, /*[2D30]*/ 1541 /** @stable ICU 3.4 */ 1542 UBLOCK_VERTICAL_FORMS = 145, /*[FE10]*/ 1543 1544 /* New blocks in Unicode 5.0 */ 1545 1546 /** @stable ICU 3.6 */ 1547 UBLOCK_NKO = 146, /*[07C0]*/ 1548 /** @stable ICU 3.6 */ 1549 UBLOCK_BALINESE = 147, /*[1B00]*/ 1550 /** @stable ICU 3.6 */ 1551 UBLOCK_LATIN_EXTENDED_C = 148, /*[2C60]*/ 1552 /** @stable ICU 3.6 */ 1553 UBLOCK_LATIN_EXTENDED_D = 149, /*[A720]*/ 1554 /** @stable ICU 3.6 */ 1555 UBLOCK_PHAGS_PA = 150, /*[A840]*/ 1556 /** @stable ICU 3.6 */ 1557 UBLOCK_PHOENICIAN = 151, /*[10900]*/ 1558 /** @stable ICU 3.6 */ 1559 UBLOCK_CUNEIFORM = 152, /*[12000]*/ 1560 /** @stable ICU 3.6 */ 1561 UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION = 153, /*[12400]*/ 1562 /** @stable ICU 3.6 */ 1563 UBLOCK_COUNTING_ROD_NUMERALS = 154, /*[1D360]*/ 1564 1565 /* New blocks in Unicode 5.1 */ 1566 1567 /** @stable ICU 4.0 */ 1568 UBLOCK_SUNDANESE = 155, /*[1B80]*/ 1569 /** @stable ICU 4.0 */ 1570 UBLOCK_LEPCHA = 156, /*[1C00]*/ 1571 /** @stable ICU 4.0 */ 1572 UBLOCK_OL_CHIKI = 157, /*[1C50]*/ 1573 /** @stable ICU 4.0 */ 1574 UBLOCK_CYRILLIC_EXTENDED_A = 158, /*[2DE0]*/ 1575 /** @stable ICU 4.0 */ 1576 UBLOCK_VAI = 159, /*[A500]*/ 1577 /** @stable ICU 4.0 */ 1578 UBLOCK_CYRILLIC_EXTENDED_B = 160, /*[A640]*/ 1579 /** @stable ICU 4.0 */ 1580 UBLOCK_SAURASHTRA = 161, /*[A880]*/ 1581 /** @stable ICU 4.0 */ 1582 UBLOCK_KAYAH_LI = 162, /*[A900]*/ 1583 /** @stable ICU 4.0 */ 1584 UBLOCK_REJANG = 163, /*[A930]*/ 1585 /** @stable ICU 4.0 */ 1586 UBLOCK_CHAM = 164, /*[AA00]*/ 1587 /** @stable ICU 4.0 */ 1588 UBLOCK_ANCIENT_SYMBOLS = 165, /*[10190]*/ 1589 /** @stable ICU 4.0 */ 1590 UBLOCK_PHAISTOS_DISC = 166, /*[101D0]*/ 1591 /** @stable ICU 4.0 */ 1592 UBLOCK_LYCIAN = 167, /*[10280]*/ 1593 /** @stable ICU 4.0 */ 1594 UBLOCK_CARIAN = 168, /*[102A0]*/ 1595 /** @stable ICU 4.0 */ 1596 UBLOCK_LYDIAN = 169, /*[10920]*/ 1597 /** @stable ICU 4.0 */ 1598 UBLOCK_MAHJONG_TILES = 170, /*[1F000]*/ 1599 /** @stable ICU 4.0 */ 1600 UBLOCK_DOMINO_TILES = 171, /*[1F030]*/ 1601 1602 /* New blocks in Unicode 5.2 */ 1603 1604 /** @stable ICU 4.4 */ 1605 UBLOCK_SAMARITAN = 172, /*[0800]*/ 1606 /** @stable ICU 4.4 */ 1607 UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED = 173, /*[18B0]*/ 1608 /** @stable ICU 4.4 */ 1609 UBLOCK_TAI_THAM = 174, /*[1A20]*/ 1610 /** @stable ICU 4.4 */ 1611 UBLOCK_VEDIC_EXTENSIONS = 175, /*[1CD0]*/ 1612 /** @stable ICU 4.4 */ 1613 UBLOCK_LISU = 176, /*[A4D0]*/ 1614 /** @stable ICU 4.4 */ 1615 UBLOCK_BAMUM = 177, /*[A6A0]*/ 1616 /** @stable ICU 4.4 */ 1617 UBLOCK_COMMON_INDIC_NUMBER_FORMS = 178, /*[A830]*/ 1618 /** @stable ICU 4.4 */ 1619 UBLOCK_DEVANAGARI_EXTENDED = 179, /*[A8E0]*/ 1620 /** @stable ICU 4.4 */ 1621 UBLOCK_HANGUL_JAMO_EXTENDED_A = 180, /*[A960]*/ 1622 /** @stable ICU 4.4 */ 1623 UBLOCK_JAVANESE = 181, /*[A980]*/ 1624 /** @stable ICU 4.4 */ 1625 UBLOCK_MYANMAR_EXTENDED_A = 182, /*[AA60]*/ 1626 /** @stable ICU 4.4 */ 1627 UBLOCK_TAI_VIET = 183, /*[AA80]*/ 1628 /** @stable ICU 4.4 */ 1629 UBLOCK_MEETEI_MAYEK = 184, /*[ABC0]*/ 1630 /** @stable ICU 4.4 */ 1631 UBLOCK_HANGUL_JAMO_EXTENDED_B = 185, /*[D7B0]*/ 1632 /** @stable ICU 4.4 */ 1633 UBLOCK_IMPERIAL_ARAMAIC = 186, /*[10840]*/ 1634 /** @stable ICU 4.4 */ 1635 UBLOCK_OLD_SOUTH_ARABIAN = 187, /*[10A60]*/ 1636 /** @stable ICU 4.4 */ 1637 UBLOCK_AVESTAN = 188, /*[10B00]*/ 1638 /** @stable ICU 4.4 */ 1639 UBLOCK_INSCRIPTIONAL_PARTHIAN = 189, /*[10B40]*/ 1640 /** @stable ICU 4.4 */ 1641 UBLOCK_INSCRIPTIONAL_PAHLAVI = 190, /*[10B60]*/ 1642 /** @stable ICU 4.4 */ 1643 UBLOCK_OLD_TURKIC = 191, /*[10C00]*/ 1644 /** @stable ICU 4.4 */ 1645 UBLOCK_RUMI_NUMERAL_SYMBOLS = 192, /*[10E60]*/ 1646 /** @stable ICU 4.4 */ 1647 UBLOCK_KAITHI = 193, /*[11080]*/ 1648 /** @stable ICU 4.4 */ 1649 UBLOCK_EGYPTIAN_HIEROGLYPHS = 194, /*[13000]*/ 1650 /** @stable ICU 4.4 */ 1651 UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT = 195, /*[1F100]*/ 1652 /** @stable ICU 4.4 */ 1653 UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT = 196, /*[1F200]*/ 1654 /** @stable ICU 4.4 */ 1655 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C = 197, /*[2A700]*/ 1656 1657 /* New blocks in Unicode 6.0 */ 1658 1659 /** @stable ICU 4.6 */ 1660 UBLOCK_MANDAIC = 198, /*[0840]*/ 1661 /** @stable ICU 4.6 */ 1662 UBLOCK_BATAK = 199, /*[1BC0]*/ 1663 /** @stable ICU 4.6 */ 1664 UBLOCK_ETHIOPIC_EXTENDED_A = 200, /*[AB00]*/ 1665 /** @stable ICU 4.6 */ 1666 UBLOCK_BRAHMI = 201, /*[11000]*/ 1667 /** @stable ICU 4.6 */ 1668 UBLOCK_BAMUM_SUPPLEMENT = 202, /*[16800]*/ 1669 /** @stable ICU 4.6 */ 1670 UBLOCK_KANA_SUPPLEMENT = 203, /*[1B000]*/ 1671 /** @stable ICU 4.6 */ 1672 UBLOCK_PLAYING_CARDS = 204, /*[1F0A0]*/ 1673 /** @stable ICU 4.6 */ 1674 UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205, /*[1F300]*/ 1675 /** @stable ICU 4.6 */ 1676 UBLOCK_EMOTICONS = 206, /*[1F600]*/ 1677 /** @stable ICU 4.6 */ 1678 UBLOCK_TRANSPORT_AND_MAP_SYMBOLS = 207, /*[1F680]*/ 1679 /** @stable ICU 4.6 */ 1680 UBLOCK_ALCHEMICAL_SYMBOLS = 208, /*[1F700]*/ 1681 /** @stable ICU 4.6 */ 1682 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209, /*[2B740]*/ 1683 1684 /* New blocks in Unicode 6.1 */ 1685 1686 /** @stable ICU 49 */ 1687 UBLOCK_ARABIC_EXTENDED_A = 210, /*[08A0]*/ 1688 /** @stable ICU 49 */ 1689 UBLOCK_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS = 211, /*[1EE00]*/ 1690 /** @stable ICU 49 */ 1691 UBLOCK_CHAKMA = 212, /*[11100]*/ 1692 /** @stable ICU 49 */ 1693 UBLOCK_MEETEI_MAYEK_EXTENSIONS = 213, /*[AAE0]*/ 1694 /** @stable ICU 49 */ 1695 UBLOCK_MEROITIC_CURSIVE = 214, /*[109A0]*/ 1696 /** @stable ICU 49 */ 1697 UBLOCK_MEROITIC_HIEROGLYPHS = 215, /*[10980]*/ 1698 /** @stable ICU 49 */ 1699 UBLOCK_MIAO = 216, /*[16F00]*/ 1700 /** @stable ICU 49 */ 1701 UBLOCK_SHARADA = 217, /*[11180]*/ 1702 /** @stable ICU 49 */ 1703 UBLOCK_SORA_SOMPENG = 218, /*[110D0]*/ 1704 /** @stable ICU 49 */ 1705 UBLOCK_SUNDANESE_SUPPLEMENT = 219, /*[1CC0]*/ 1706 /** @stable ICU 49 */ 1707 UBLOCK_TAKRI = 220, /*[11680]*/ 1708 1709 /* New blocks in Unicode 7.0 */ 1710 1711 /** @stable ICU 54 */ 1712 UBLOCK_BASSA_VAH = 221, /*[16AD0]*/ 1713 /** @stable ICU 54 */ 1714 UBLOCK_CAUCASIAN_ALBANIAN = 222, /*[10530]*/ 1715 /** @stable ICU 54 */ 1716 UBLOCK_COPTIC_EPACT_NUMBERS = 223, /*[102E0]*/ 1717 /** @stable ICU 54 */ 1718 UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED = 224, /*[1AB0]*/ 1719 /** @stable ICU 54 */ 1720 UBLOCK_DUPLOYAN = 225, /*[1BC00]*/ 1721 /** @stable ICU 54 */ 1722 UBLOCK_ELBASAN = 226, /*[10500]*/ 1723 /** @stable ICU 54 */ 1724 UBLOCK_GEOMETRIC_SHAPES_EXTENDED = 227, /*[1F780]*/ 1725 /** @stable ICU 54 */ 1726 UBLOCK_GRANTHA = 228, /*[11300]*/ 1727 /** @stable ICU 54 */ 1728 UBLOCK_KHOJKI = 229, /*[11200]*/ 1729 /** @stable ICU 54 */ 1730 UBLOCK_KHUDAWADI = 230, /*[112B0]*/ 1731 /** @stable ICU 54 */ 1732 UBLOCK_LATIN_EXTENDED_E = 231, /*[AB30]*/ 1733 /** @stable ICU 54 */ 1734 UBLOCK_LINEAR_A = 232, /*[10600]*/ 1735 /** @stable ICU 54 */ 1736 UBLOCK_MAHAJANI = 233, /*[11150]*/ 1737 /** @stable ICU 54 */ 1738 UBLOCK_MANICHAEAN = 234, /*[10AC0]*/ 1739 /** @stable ICU 54 */ 1740 UBLOCK_MENDE_KIKAKUI = 235, /*[1E800]*/ 1741 /** @stable ICU 54 */ 1742 UBLOCK_MODI = 236, /*[11600]*/ 1743 /** @stable ICU 54 */ 1744 UBLOCK_MRO = 237, /*[16A40]*/ 1745 /** @stable ICU 54 */ 1746 UBLOCK_MYANMAR_EXTENDED_B = 238, /*[A9E0]*/ 1747 /** @stable ICU 54 */ 1748 UBLOCK_NABATAEAN = 239, /*[10880]*/ 1749 /** @stable ICU 54 */ 1750 UBLOCK_OLD_NORTH_ARABIAN = 240, /*[10A80]*/ 1751 /** @stable ICU 54 */ 1752 UBLOCK_OLD_PERMIC = 241, /*[10350]*/ 1753 /** @stable ICU 54 */ 1754 UBLOCK_ORNAMENTAL_DINGBATS = 242, /*[1F650]*/ 1755 /** @stable ICU 54 */ 1756 UBLOCK_PAHAWH_HMONG = 243, /*[16B00]*/ 1757 /** @stable ICU 54 */ 1758 UBLOCK_PALMYRENE = 244, /*[10860]*/ 1759 /** @stable ICU 54 */ 1760 UBLOCK_PAU_CIN_HAU = 245, /*[11AC0]*/ 1761 /** @stable ICU 54 */ 1762 UBLOCK_PSALTER_PAHLAVI = 246, /*[10B80]*/ 1763 /** @stable ICU 54 */ 1764 UBLOCK_SHORTHAND_FORMAT_CONTROLS = 247, /*[1BCA0]*/ 1765 /** @stable ICU 54 */ 1766 UBLOCK_SIDDHAM = 248, /*[11580]*/ 1767 /** @stable ICU 54 */ 1768 UBLOCK_SINHALA_ARCHAIC_NUMBERS = 249, /*[111E0]*/ 1769 /** @stable ICU 54 */ 1770 UBLOCK_SUPPLEMENTAL_ARROWS_C = 250, /*[1F800]*/ 1771 /** @stable ICU 54 */ 1772 UBLOCK_TIRHUTA = 251, /*[11480]*/ 1773 /** @stable ICU 54 */ 1774 UBLOCK_WARANG_CITI = 252, /*[118A0]*/ 1775 1776 /* New blocks in Unicode 8.0 */ 1777 1778 /** @stable ICU 56 */ 1779 UBLOCK_AHOM = 253, /*[11700]*/ 1780 /** @stable ICU 56 */ 1781 UBLOCK_ANATOLIAN_HIEROGLYPHS = 254, /*[14400]*/ 1782 /** @stable ICU 56 */ 1783 UBLOCK_CHEROKEE_SUPPLEMENT = 255, /*[AB70]*/ 1784 /** @stable ICU 56 */ 1785 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E = 256, /*[2B820]*/ 1786 /** @stable ICU 56 */ 1787 UBLOCK_EARLY_DYNASTIC_CUNEIFORM = 257, /*[12480]*/ 1788 /** @stable ICU 56 */ 1789 UBLOCK_HATRAN = 258, /*[108E0]*/ 1790 /** @stable ICU 56 */ 1791 UBLOCK_MULTANI = 259, /*[11280]*/ 1792 /** @stable ICU 56 */ 1793 UBLOCK_OLD_HUNGARIAN = 260, /*[10C80]*/ 1794 /** @stable ICU 56 */ 1795 UBLOCK_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS = 261, /*[1F900]*/ 1796 /** @stable ICU 56 */ 1797 UBLOCK_SUTTON_SIGNWRITING = 262, /*[1D800]*/ 1798 1799 /* New blocks in Unicode 9.0 */ 1800 1801 /** @stable ICU 58 */ 1802 UBLOCK_ADLAM = 263, /*[1E900]*/ 1803 /** @stable ICU 58 */ 1804 UBLOCK_BHAIKSUKI = 264, /*[11C00]*/ 1805 /** @stable ICU 58 */ 1806 UBLOCK_CYRILLIC_EXTENDED_C = 265, /*[1C80]*/ 1807 /** @stable ICU 58 */ 1808 UBLOCK_GLAGOLITIC_SUPPLEMENT = 266, /*[1E000]*/ 1809 /** @stable ICU 58 */ 1810 UBLOCK_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION = 267, /*[16FE0]*/ 1811 /** @stable ICU 58 */ 1812 UBLOCK_MARCHEN = 268, /*[11C70]*/ 1813 /** @stable ICU 58 */ 1814 UBLOCK_MONGOLIAN_SUPPLEMENT = 269, /*[11660]*/ 1815 /** @stable ICU 58 */ 1816 UBLOCK_NEWA = 270, /*[11400]*/ 1817 /** @stable ICU 58 */ 1818 UBLOCK_OSAGE = 271, /*[104B0]*/ 1819 /** @stable ICU 58 */ 1820 UBLOCK_TANGUT = 272, /*[17000]*/ 1821 /** @stable ICU 58 */ 1822 UBLOCK_TANGUT_COMPONENTS = 273, /*[18800]*/ 1823 1824 // New blocks in Unicode 10.0 1825 1826 /** @stable ICU 60 */ 1827 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F = 274, /*[2CEB0]*/ 1828 /** @stable ICU 60 */ 1829 UBLOCK_KANA_EXTENDED_A = 275, /*[1B100]*/ 1830 /** @stable ICU 60 */ 1831 UBLOCK_MASARAM_GONDI = 276, /*[11D00]*/ 1832 /** @stable ICU 60 */ 1833 UBLOCK_NUSHU = 277, /*[1B170]*/ 1834 /** @stable ICU 60 */ 1835 UBLOCK_SOYOMBO = 278, /*[11A50]*/ 1836 /** @stable ICU 60 */ 1837 UBLOCK_SYRIAC_SUPPLEMENT = 279, /*[0860]*/ 1838 /** @stable ICU 60 */ 1839 UBLOCK_ZANABAZAR_SQUARE = 280, /*[11A00]*/ 1840 1841 // New blocks in Unicode 11.0 1842 1843 /** @stable ICU 62 */ 1844 UBLOCK_CHESS_SYMBOLS = 281, /*[1FA00]*/ 1845 /** @stable ICU 62 */ 1846 UBLOCK_DOGRA = 282, /*[11800]*/ 1847 /** @stable ICU 62 */ 1848 UBLOCK_GEORGIAN_EXTENDED = 283, /*[1C90]*/ 1849 /** @stable ICU 62 */ 1850 UBLOCK_GUNJALA_GONDI = 284, /*[11D60]*/ 1851 /** @stable ICU 62 */ 1852 UBLOCK_HANIFI_ROHINGYA = 285, /*[10D00]*/ 1853 /** @stable ICU 62 */ 1854 UBLOCK_INDIC_SIYAQ_NUMBERS = 286, /*[1EC70]*/ 1855 /** @stable ICU 62 */ 1856 UBLOCK_MAKASAR = 287, /*[11EE0]*/ 1857 /** @stable ICU 62 */ 1858 UBLOCK_MAYAN_NUMERALS = 288, /*[1D2E0]*/ 1859 /** @stable ICU 62 */ 1860 UBLOCK_MEDEFAIDRIN = 289, /*[16E40]*/ 1861 /** @stable ICU 62 */ 1862 UBLOCK_OLD_SOGDIAN = 290, /*[10F00]*/ 1863 /** @stable ICU 62 */ 1864 UBLOCK_SOGDIAN = 291, /*[10F30]*/ 1865 1866 // New blocks in Unicode 12.0 1867 1868 /** @stable ICU 64 */ 1869 UBLOCK_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS = 292, /*[13430]*/ 1870 /** @stable ICU 64 */ 1871 UBLOCK_ELYMAIC = 293, /*[10FE0]*/ 1872 /** @stable ICU 64 */ 1873 UBLOCK_NANDINAGARI = 294, /*[119A0]*/ 1874 /** @stable ICU 64 */ 1875 UBLOCK_NYIAKENG_PUACHUE_HMONG = 295, /*[1E100]*/ 1876 /** @stable ICU 64 */ 1877 UBLOCK_OTTOMAN_SIYAQ_NUMBERS = 296, /*[1ED00]*/ 1878 /** @stable ICU 64 */ 1879 UBLOCK_SMALL_KANA_EXTENSION = 297, /*[1B130]*/ 1880 /** @stable ICU 64 */ 1881 UBLOCK_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A = 298, /*[1FA70]*/ 1882 /** @stable ICU 64 */ 1883 UBLOCK_TAMIL_SUPPLEMENT = 299, /*[11FC0]*/ 1884 /** @stable ICU 64 */ 1885 UBLOCK_WANCHO = 300, /*[1E2C0]*/ 1886 1887 // New blocks in Unicode 13.0 1888 1889 /** @stable ICU 66 */ 1890 UBLOCK_CHORASMIAN = 301, /*[10FB0]*/ 1891 /** @stable ICU 66 */ 1892 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G = 302, /*[30000]*/ 1893 /** @stable ICU 66 */ 1894 UBLOCK_DIVES_AKURU = 303, /*[11900]*/ 1895 /** @stable ICU 66 */ 1896 UBLOCK_KHITAN_SMALL_SCRIPT = 304, /*[18B00]*/ 1897 /** @stable ICU 66 */ 1898 UBLOCK_LISU_SUPPLEMENT = 305, /*[11FB0]*/ 1899 /** @stable ICU 66 */ 1900 UBLOCK_SYMBOLS_FOR_LEGACY_COMPUTING = 306, /*[1FB00]*/ 1901 /** @stable ICU 66 */ 1902 UBLOCK_TANGUT_SUPPLEMENT = 307, /*[18D00]*/ 1903 /** @stable ICU 66 */ 1904 UBLOCK_YEZIDI = 308, /*[10E80]*/ 1905 1906 // New blocks in Unicode 14.0 1907 1908 /** @stable ICU 70 */ 1909 UBLOCK_ARABIC_EXTENDED_B = 309, /*[0870]*/ 1910 /** @stable ICU 70 */ 1911 UBLOCK_CYPRO_MINOAN = 310, /*[12F90]*/ 1912 /** @stable ICU 70 */ 1913 UBLOCK_ETHIOPIC_EXTENDED_B = 311, /*[1E7E0]*/ 1914 /** @stable ICU 70 */ 1915 UBLOCK_KANA_EXTENDED_B = 312, /*[1AFF0]*/ 1916 /** @stable ICU 70 */ 1917 UBLOCK_LATIN_EXTENDED_F = 313, /*[10780]*/ 1918 /** @stable ICU 70 */ 1919 UBLOCK_LATIN_EXTENDED_G = 314, /*[1DF00]*/ 1920 /** @stable ICU 70 */ 1921 UBLOCK_OLD_UYGHUR = 315, /*[10F70]*/ 1922 /** @stable ICU 70 */ 1923 UBLOCK_TANGSA = 316, /*[16A70]*/ 1924 /** @stable ICU 70 */ 1925 UBLOCK_TOTO = 317, /*[1E290]*/ 1926 /** @stable ICU 70 */ 1927 UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A = 318, /*[11AB0]*/ 1928 /** @stable ICU 70 */ 1929 UBLOCK_VITHKUQI = 319, /*[10570]*/ 1930 /** @stable ICU 70 */ 1931 UBLOCK_ZNAMENNY_MUSICAL_NOTATION = 320, /*[1CF00]*/ 1932 1933 // New blocks in Unicode 15.0 1934 1935 /** @stable ICU 72 */ 1936 UBLOCK_ARABIC_EXTENDED_C = 321, /*[10EC0]*/ 1937 /** @stable ICU 72 */ 1938 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H = 322, /*[31350]*/ 1939 /** @stable ICU 72 */ 1940 UBLOCK_CYRILLIC_EXTENDED_D = 323, /*[1E030]*/ 1941 /** @stable ICU 72 */ 1942 UBLOCK_DEVANAGARI_EXTENDED_A = 324, /*[11B00]*/ 1943 /** @stable ICU 72 */ 1944 UBLOCK_KAKTOVIK_NUMERALS = 325, /*[1D2C0]*/ 1945 /** @stable ICU 72 */ 1946 UBLOCK_KAWI = 326, /*[11F00]*/ 1947 /** @stable ICU 72 */ 1948 UBLOCK_NAG_MUNDARI = 327, /*[1E4D0]*/ 1949 1950 // New block in Unicode 15.1 1951 1952 /** @stable ICU 74 */ 1953 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I = 328, /*[2EBF0]*/ 1954 1955 #ifndef U_HIDE_DEPRECATED_API 1956 /** 1957 * One more than the highest normal UBlockCode value. 1958 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BLOCK). 1959 * 1960 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 1961 */ 1962 UBLOCK_COUNT = 329, 1963 #endif // U_HIDE_DEPRECATED_API 1964 1965 /** @stable ICU 2.0 */ 1966 UBLOCK_INVALID_CODE=-1 1967 }; 1968 1969 /** @stable ICU 2.0 */ 1970 typedef enum UBlockCode UBlockCode; 1971 1972 /** 1973 * East Asian Width constants. 1974 * 1975 * @see UCHAR_EAST_ASIAN_WIDTH 1976 * @see u_getIntPropertyValue 1977 * @stable ICU 2.2 1978 */ 1979 typedef enum UEastAsianWidth { 1980 /* 1981 * Note: UEastAsianWidth constants are parsed by preparseucd.py. 1982 * It matches lines like 1983 * U_EA_<Unicode East_Asian_Width value name> 1984 */ 1985 1986 U_EA_NEUTRAL, /*[N]*/ 1987 U_EA_AMBIGUOUS, /*[A]*/ 1988 U_EA_HALFWIDTH, /*[H]*/ 1989 U_EA_FULLWIDTH, /*[F]*/ 1990 U_EA_NARROW, /*[Na]*/ 1991 U_EA_WIDE, /*[W]*/ 1992 #ifndef U_HIDE_DEPRECATED_API 1993 /** 1994 * One more than the highest normal UEastAsianWidth value. 1995 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH). 1996 * 1997 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 1998 */ 1999 U_EA_COUNT 2000 #endif // U_HIDE_DEPRECATED_API 2001 } UEastAsianWidth; 2002 2003 /** 2004 * Selector constants for u_charName(). 2005 * u_charName() returns the "modern" name of a 2006 * Unicode character; or the name that was defined in 2007 * Unicode version 1.0, before the Unicode standard merged 2008 * with ISO-10646; or an "extended" name that gives each 2009 * Unicode code point a unique name. 2010 * 2011 * @see u_charName 2012 * @stable ICU 2.0 2013 */ 2014 typedef enum UCharNameChoice { 2015 /** Unicode character name (Name property). @stable ICU 2.0 */ 2016 U_UNICODE_CHAR_NAME, 2017 #ifndef U_HIDE_DEPRECATED_API 2018 /** 2019 * The Unicode_1_Name property value which is of little practical value. 2020 * Beginning with ICU 49, ICU APIs return an empty string for this name choice. 2021 * @deprecated ICU 49 2022 */ 2023 U_UNICODE_10_CHAR_NAME, 2024 #endif /* U_HIDE_DEPRECATED_API */ 2025 /** Standard or synthetic character name. @stable ICU 2.0 */ 2026 U_EXTENDED_CHAR_NAME = U_UNICODE_CHAR_NAME+2, 2027 /** Corrected name from NameAliases.txt. @stable ICU 4.4 */ 2028 U_CHAR_NAME_ALIAS, 2029 #ifndef U_HIDE_DEPRECATED_API 2030 /** 2031 * One more than the highest normal UCharNameChoice value. 2032 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2033 */ 2034 U_CHAR_NAME_CHOICE_COUNT 2035 #endif // U_HIDE_DEPRECATED_API 2036 } UCharNameChoice; 2037 2038 /** 2039 * Selector constants for u_getPropertyName() and 2040 * u_getPropertyValueName(). These selectors are used to choose which 2041 * name is returned for a given property or value. All properties and 2042 * values have a long name. Most have a short name, but some do not. 2043 * Unicode allows for additional names, beyond the long and short 2044 * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where 2045 * i=1, 2,... 2046 * 2047 * @see u_getPropertyName() 2048 * @see u_getPropertyValueName() 2049 * @stable ICU 2.4 2050 */ 2051 typedef enum UPropertyNameChoice { 2052 U_SHORT_PROPERTY_NAME, 2053 U_LONG_PROPERTY_NAME, 2054 #ifndef U_HIDE_DEPRECATED_API 2055 /** 2056 * One more than the highest normal UPropertyNameChoice value. 2057 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2058 */ 2059 U_PROPERTY_NAME_CHOICE_COUNT 2060 #endif // U_HIDE_DEPRECATED_API 2061 } UPropertyNameChoice; 2062 2063 /** 2064 * Decomposition Type constants. 2065 * 2066 * @see UCHAR_DECOMPOSITION_TYPE 2067 * @stable ICU 2.2 2068 */ 2069 typedef enum UDecompositionType { 2070 /* 2071 * Note: UDecompositionType constants are parsed by preparseucd.py. 2072 * It matches lines like 2073 * U_DT_<Unicode Decomposition_Type value name> 2074 */ 2075 2076 U_DT_NONE, /*[none]*/ 2077 U_DT_CANONICAL, /*[can]*/ 2078 U_DT_COMPAT, /*[com]*/ 2079 U_DT_CIRCLE, /*[enc]*/ 2080 U_DT_FINAL, /*[fin]*/ 2081 U_DT_FONT, /*[font]*/ 2082 U_DT_FRACTION, /*[fra]*/ 2083 U_DT_INITIAL, /*[init]*/ 2084 U_DT_ISOLATED, /*[iso]*/ 2085 U_DT_MEDIAL, /*[med]*/ 2086 U_DT_NARROW, /*[nar]*/ 2087 U_DT_NOBREAK, /*[nb]*/ 2088 U_DT_SMALL, /*[sml]*/ 2089 U_DT_SQUARE, /*[sqr]*/ 2090 U_DT_SUB, /*[sub]*/ 2091 U_DT_SUPER, /*[sup]*/ 2092 U_DT_VERTICAL, /*[vert]*/ 2093 U_DT_WIDE, /*[wide]*/ 2094 #ifndef U_HIDE_DEPRECATED_API 2095 /** 2096 * One more than the highest normal UDecompositionType value. 2097 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_DECOMPOSITION_TYPE). 2098 * 2099 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2100 */ 2101 U_DT_COUNT /* 18 */ 2102 #endif // U_HIDE_DEPRECATED_API 2103 } UDecompositionType; 2104 2105 /** 2106 * Joining Type constants. 2107 * 2108 * @see UCHAR_JOINING_TYPE 2109 * @stable ICU 2.2 2110 */ 2111 typedef enum UJoiningType { 2112 /* 2113 * Note: UJoiningType constants are parsed by preparseucd.py. 2114 * It matches lines like 2115 * U_JT_<Unicode Joining_Type value name> 2116 */ 2117 2118 U_JT_NON_JOINING, /*[U]*/ 2119 U_JT_JOIN_CAUSING, /*[C]*/ 2120 U_JT_DUAL_JOINING, /*[D]*/ 2121 U_JT_LEFT_JOINING, /*[L]*/ 2122 U_JT_RIGHT_JOINING, /*[R]*/ 2123 U_JT_TRANSPARENT, /*[T]*/ 2124 #ifndef U_HIDE_DEPRECATED_API 2125 /** 2126 * One more than the highest normal UJoiningType value. 2127 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_JOINING_TYPE). 2128 * 2129 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2130 */ 2131 U_JT_COUNT /* 6 */ 2132 #endif // U_HIDE_DEPRECATED_API 2133 } UJoiningType; 2134 2135 /** 2136 * Joining Group constants. 2137 * 2138 * @see UCHAR_JOINING_GROUP 2139 * @stable ICU 2.2 2140 */ 2141 typedef enum UJoiningGroup { 2142 /* 2143 * Note: UJoiningGroup constants are parsed by preparseucd.py. 2144 * It matches lines like 2145 * U_JG_<Unicode Joining_Group value name> 2146 */ 2147 2148 U_JG_NO_JOINING_GROUP, 2149 U_JG_AIN, 2150 U_JG_ALAPH, 2151 U_JG_ALEF, 2152 U_JG_BEH, 2153 U_JG_BETH, 2154 U_JG_DAL, 2155 U_JG_DALATH_RISH, 2156 U_JG_E, 2157 U_JG_FEH, 2158 U_JG_FINAL_SEMKATH, 2159 U_JG_GAF, 2160 U_JG_GAMAL, 2161 U_JG_HAH, 2162 U_JG_TEH_MARBUTA_GOAL, /**< @stable ICU 4.6 */ 2163 U_JG_HAMZA_ON_HEH_GOAL=U_JG_TEH_MARBUTA_GOAL, 2164 U_JG_HE, 2165 U_JG_HEH, 2166 U_JG_HEH_GOAL, 2167 U_JG_HETH, 2168 U_JG_KAF, 2169 U_JG_KAPH, 2170 U_JG_KNOTTED_HEH, 2171 U_JG_LAM, 2172 U_JG_LAMADH, 2173 U_JG_MEEM, 2174 U_JG_MIM, 2175 U_JG_NOON, 2176 U_JG_NUN, 2177 U_JG_PE, 2178 U_JG_QAF, 2179 U_JG_QAPH, 2180 U_JG_REH, 2181 U_JG_REVERSED_PE, 2182 U_JG_SAD, 2183 U_JG_SADHE, 2184 U_JG_SEEN, 2185 U_JG_SEMKATH, 2186 U_JG_SHIN, 2187 U_JG_SWASH_KAF, 2188 U_JG_SYRIAC_WAW, 2189 U_JG_TAH, 2190 U_JG_TAW, 2191 U_JG_TEH_MARBUTA, 2192 U_JG_TETH, 2193 U_JG_WAW, 2194 U_JG_YEH, 2195 U_JG_YEH_BARREE, 2196 U_JG_YEH_WITH_TAIL, 2197 U_JG_YUDH, 2198 U_JG_YUDH_HE, 2199 U_JG_ZAIN, 2200 U_JG_FE, /**< @stable ICU 2.6 */ 2201 U_JG_KHAPH, /**< @stable ICU 2.6 */ 2202 U_JG_ZHAIN, /**< @stable ICU 2.6 */ 2203 U_JG_BURUSHASKI_YEH_BARREE, /**< @stable ICU 4.0 */ 2204 U_JG_FARSI_YEH, /**< @stable ICU 4.4 */ 2205 U_JG_NYA, /**< @stable ICU 4.4 */ 2206 U_JG_ROHINGYA_YEH, /**< @stable ICU 49 */ 2207 U_JG_MANICHAEAN_ALEPH, /**< @stable ICU 54 */ 2208 U_JG_MANICHAEAN_AYIN, /**< @stable ICU 54 */ 2209 U_JG_MANICHAEAN_BETH, /**< @stable ICU 54 */ 2210 U_JG_MANICHAEAN_DALETH, /**< @stable ICU 54 */ 2211 U_JG_MANICHAEAN_DHAMEDH, /**< @stable ICU 54 */ 2212 U_JG_MANICHAEAN_FIVE, /**< @stable ICU 54 */ 2213 U_JG_MANICHAEAN_GIMEL, /**< @stable ICU 54 */ 2214 U_JG_MANICHAEAN_HETH, /**< @stable ICU 54 */ 2215 U_JG_MANICHAEAN_HUNDRED, /**< @stable ICU 54 */ 2216 U_JG_MANICHAEAN_KAPH, /**< @stable ICU 54 */ 2217 U_JG_MANICHAEAN_LAMEDH, /**< @stable ICU 54 */ 2218 U_JG_MANICHAEAN_MEM, /**< @stable ICU 54 */ 2219 U_JG_MANICHAEAN_NUN, /**< @stable ICU 54 */ 2220 U_JG_MANICHAEAN_ONE, /**< @stable ICU 54 */ 2221 U_JG_MANICHAEAN_PE, /**< @stable ICU 54 */ 2222 U_JG_MANICHAEAN_QOPH, /**< @stable ICU 54 */ 2223 U_JG_MANICHAEAN_RESH, /**< @stable ICU 54 */ 2224 U_JG_MANICHAEAN_SADHE, /**< @stable ICU 54 */ 2225 U_JG_MANICHAEAN_SAMEKH, /**< @stable ICU 54 */ 2226 U_JG_MANICHAEAN_TAW, /**< @stable ICU 54 */ 2227 U_JG_MANICHAEAN_TEN, /**< @stable ICU 54 */ 2228 U_JG_MANICHAEAN_TETH, /**< @stable ICU 54 */ 2229 U_JG_MANICHAEAN_THAMEDH, /**< @stable ICU 54 */ 2230 U_JG_MANICHAEAN_TWENTY, /**< @stable ICU 54 */ 2231 U_JG_MANICHAEAN_WAW, /**< @stable ICU 54 */ 2232 U_JG_MANICHAEAN_YODH, /**< @stable ICU 54 */ 2233 U_JG_MANICHAEAN_ZAYIN, /**< @stable ICU 54 */ 2234 U_JG_STRAIGHT_WAW, /**< @stable ICU 54 */ 2235 U_JG_AFRICAN_FEH, /**< @stable ICU 58 */ 2236 U_JG_AFRICAN_NOON, /**< @stable ICU 58 */ 2237 U_JG_AFRICAN_QAF, /**< @stable ICU 58 */ 2238 2239 U_JG_MALAYALAM_BHA, /**< @stable ICU 60 */ 2240 U_JG_MALAYALAM_JA, /**< @stable ICU 60 */ 2241 U_JG_MALAYALAM_LLA, /**< @stable ICU 60 */ 2242 U_JG_MALAYALAM_LLLA, /**< @stable ICU 60 */ 2243 U_JG_MALAYALAM_NGA, /**< @stable ICU 60 */ 2244 U_JG_MALAYALAM_NNA, /**< @stable ICU 60 */ 2245 U_JG_MALAYALAM_NNNA, /**< @stable ICU 60 */ 2246 U_JG_MALAYALAM_NYA, /**< @stable ICU 60 */ 2247 U_JG_MALAYALAM_RA, /**< @stable ICU 60 */ 2248 U_JG_MALAYALAM_SSA, /**< @stable ICU 60 */ 2249 U_JG_MALAYALAM_TTA, /**< @stable ICU 60 */ 2250 2251 U_JG_HANIFI_ROHINGYA_KINNA_YA, /**< @stable ICU 62 */ 2252 U_JG_HANIFI_ROHINGYA_PA, /**< @stable ICU 62 */ 2253 2254 U_JG_THIN_YEH, /**< @stable ICU 70 */ 2255 U_JG_VERTICAL_TAIL, /**< @stable ICU 70 */ 2256 2257 #ifndef U_HIDE_DEPRECATED_API 2258 /** 2259 * One more than the highest normal UJoiningGroup value. 2260 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_JOINING_GROUP). 2261 * 2262 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2263 */ 2264 U_JG_COUNT 2265 #endif // U_HIDE_DEPRECATED_API 2266 } UJoiningGroup; 2267 2268 /** 2269 * Grapheme Cluster Break constants. 2270 * 2271 * @see UCHAR_GRAPHEME_CLUSTER_BREAK 2272 * @stable ICU 3.4 2273 */ 2274 typedef enum UGraphemeClusterBreak { 2275 /* 2276 * Note: UGraphemeClusterBreak constants are parsed by preparseucd.py. 2277 * It matches lines like 2278 * U_GCB_<Unicode Grapheme_Cluster_Break value name> 2279 */ 2280 2281 U_GCB_OTHER = 0, /*[XX]*/ 2282 U_GCB_CONTROL = 1, /*[CN]*/ 2283 U_GCB_CR = 2, /*[CR]*/ 2284 U_GCB_EXTEND = 3, /*[EX]*/ 2285 U_GCB_L = 4, /*[L]*/ 2286 U_GCB_LF = 5, /*[LF]*/ 2287 U_GCB_LV = 6, /*[LV]*/ 2288 U_GCB_LVT = 7, /*[LVT]*/ 2289 U_GCB_T = 8, /*[T]*/ 2290 U_GCB_V = 9, /*[V]*/ 2291 /** @stable ICU 4.0 */ 2292 U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */ 2293 /** @stable ICU 4.0 */ 2294 U_GCB_PREPEND = 11, /*[PP]*/ 2295 /** @stable ICU 50 */ 2296 U_GCB_REGIONAL_INDICATOR = 12, /*[RI]*/ /* new in Unicode 6.2/ICU 50 */ 2297 /** @stable ICU 58 */ 2298 U_GCB_E_BASE = 13, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */ 2299 /** @stable ICU 58 */ 2300 U_GCB_E_BASE_GAZ = 14, /*[EBG]*/ 2301 /** @stable ICU 58 */ 2302 U_GCB_E_MODIFIER = 15, /*[EM]*/ 2303 /** @stable ICU 58 */ 2304 U_GCB_GLUE_AFTER_ZWJ = 16, /*[GAZ]*/ 2305 /** @stable ICU 58 */ 2306 U_GCB_ZWJ = 17, /*[ZWJ]*/ 2307 2308 #ifndef U_HIDE_DEPRECATED_API 2309 /** 2310 * One more than the highest normal UGraphemeClusterBreak value. 2311 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_GRAPHEME_CLUSTER_BREAK). 2312 * 2313 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2314 */ 2315 U_GCB_COUNT = 18 2316 #endif // U_HIDE_DEPRECATED_API 2317 } UGraphemeClusterBreak; 2318 2319 /** 2320 * Word Break constants. 2321 * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.) 2322 * 2323 * @see UCHAR_WORD_BREAK 2324 * @stable ICU 3.4 2325 */ 2326 typedef enum UWordBreakValues { 2327 /* 2328 * Note: UWordBreakValues constants are parsed by preparseucd.py. 2329 * It matches lines like 2330 * U_WB_<Unicode Word_Break value name> 2331 */ 2332 2333 U_WB_OTHER = 0, /*[XX]*/ 2334 U_WB_ALETTER = 1, /*[LE]*/ 2335 U_WB_FORMAT = 2, /*[FO]*/ 2336 U_WB_KATAKANA = 3, /*[KA]*/ 2337 U_WB_MIDLETTER = 4, /*[ML]*/ 2338 U_WB_MIDNUM = 5, /*[MN]*/ 2339 U_WB_NUMERIC = 6, /*[NU]*/ 2340 U_WB_EXTENDNUMLET = 7, /*[EX]*/ 2341 /** @stable ICU 4.0 */ 2342 U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */ 2343 /** @stable ICU 4.0 */ 2344 U_WB_EXTEND = 9, /*[Extend]*/ 2345 /** @stable ICU 4.0 */ 2346 U_WB_LF = 10, /*[LF]*/ 2347 /** @stable ICU 4.0 */ 2348 U_WB_MIDNUMLET =11, /*[MB]*/ 2349 /** @stable ICU 4.0 */ 2350 U_WB_NEWLINE =12, /*[NL]*/ 2351 /** @stable ICU 50 */ 2352 U_WB_REGIONAL_INDICATOR = 13, /*[RI]*/ /* new in Unicode 6.2/ICU 50 */ 2353 /** @stable ICU 52 */ 2354 U_WB_HEBREW_LETTER = 14, /*[HL]*/ /* from here on: new in Unicode 6.3/ICU 52 */ 2355 /** @stable ICU 52 */ 2356 U_WB_SINGLE_QUOTE = 15, /*[SQ]*/ 2357 /** @stable ICU 52 */ 2358 U_WB_DOUBLE_QUOTE = 16, /*[DQ]*/ 2359 /** @stable ICU 58 */ 2360 U_WB_E_BASE = 17, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */ 2361 /** @stable ICU 58 */ 2362 U_WB_E_BASE_GAZ = 18, /*[EBG]*/ 2363 /** @stable ICU 58 */ 2364 U_WB_E_MODIFIER = 19, /*[EM]*/ 2365 /** @stable ICU 58 */ 2366 U_WB_GLUE_AFTER_ZWJ = 20, /*[GAZ]*/ 2367 /** @stable ICU 58 */ 2368 U_WB_ZWJ = 21, /*[ZWJ]*/ 2369 /** @stable ICU 62 */ 2370 U_WB_WSEGSPACE = 22, /*[WSEGSPACE]*/ 2371 2372 #ifndef U_HIDE_DEPRECATED_API 2373 /** 2374 * One more than the highest normal UWordBreakValues value. 2375 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_WORD_BREAK). 2376 * 2377 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2378 */ 2379 U_WB_COUNT = 23 2380 #endif // U_HIDE_DEPRECATED_API 2381 } UWordBreakValues; 2382 2383 /** 2384 * Sentence Break constants. 2385 * 2386 * @see UCHAR_SENTENCE_BREAK 2387 * @stable ICU 3.4 2388 */ 2389 typedef enum USentenceBreak { 2390 /* 2391 * Note: USentenceBreak constants are parsed by preparseucd.py. 2392 * It matches lines like 2393 * U_SB_<Unicode Sentence_Break value name> 2394 */ 2395 2396 U_SB_OTHER = 0, /*[XX]*/ 2397 U_SB_ATERM = 1, /*[AT]*/ 2398 U_SB_CLOSE = 2, /*[CL]*/ 2399 U_SB_FORMAT = 3, /*[FO]*/ 2400 U_SB_LOWER = 4, /*[LO]*/ 2401 U_SB_NUMERIC = 5, /*[NU]*/ 2402 U_SB_OLETTER = 6, /*[LE]*/ 2403 U_SB_SEP = 7, /*[SE]*/ 2404 U_SB_SP = 8, /*[SP]*/ 2405 U_SB_STERM = 9, /*[ST]*/ 2406 U_SB_UPPER = 10, /*[UP]*/ 2407 U_SB_CR = 11, /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */ 2408 U_SB_EXTEND = 12, /*[EX]*/ 2409 U_SB_LF = 13, /*[LF]*/ 2410 U_SB_SCONTINUE = 14, /*[SC]*/ 2411 #ifndef U_HIDE_DEPRECATED_API 2412 /** 2413 * One more than the highest normal USentenceBreak value. 2414 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_SENTENCE_BREAK). 2415 * 2416 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2417 */ 2418 U_SB_COUNT = 15 2419 #endif // U_HIDE_DEPRECATED_API 2420 } USentenceBreak; 2421 2422 /** 2423 * Line Break constants. 2424 * 2425 * @see UCHAR_LINE_BREAK 2426 * @stable ICU 2.2 2427 */ 2428 typedef enum ULineBreak { 2429 /* 2430 * Note: ULineBreak constants are parsed by preparseucd.py. 2431 * It matches lines like 2432 * U_LB_<Unicode Line_Break value name> 2433 */ 2434 2435 U_LB_UNKNOWN = 0, /*[XX]*/ 2436 U_LB_AMBIGUOUS = 1, /*[AI]*/ 2437 U_LB_ALPHABETIC = 2, /*[AL]*/ 2438 U_LB_BREAK_BOTH = 3, /*[B2]*/ 2439 U_LB_BREAK_AFTER = 4, /*[BA]*/ 2440 U_LB_BREAK_BEFORE = 5, /*[BB]*/ 2441 U_LB_MANDATORY_BREAK = 6, /*[BK]*/ 2442 U_LB_CONTINGENT_BREAK = 7, /*[CB]*/ 2443 U_LB_CLOSE_PUNCTUATION = 8, /*[CL]*/ 2444 U_LB_COMBINING_MARK = 9, /*[CM]*/ 2445 U_LB_CARRIAGE_RETURN = 10, /*[CR]*/ 2446 U_LB_EXCLAMATION = 11, /*[EX]*/ 2447 U_LB_GLUE = 12, /*[GL]*/ 2448 U_LB_HYPHEN = 13, /*[HY]*/ 2449 U_LB_IDEOGRAPHIC = 14, /*[ID]*/ 2450 /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0 @stable ICU 3.0 */ 2451 U_LB_INSEPARABLE = 15, /*[IN]*/ 2452 U_LB_INSEPERABLE = U_LB_INSEPARABLE, 2453 U_LB_INFIX_NUMERIC = 16, /*[IS]*/ 2454 U_LB_LINE_FEED = 17, /*[LF]*/ 2455 U_LB_NONSTARTER = 18, /*[NS]*/ 2456 U_LB_NUMERIC = 19, /*[NU]*/ 2457 U_LB_OPEN_PUNCTUATION = 20, /*[OP]*/ 2458 U_LB_POSTFIX_NUMERIC = 21, /*[PO]*/ 2459 U_LB_PREFIX_NUMERIC = 22, /*[PR]*/ 2460 U_LB_QUOTATION = 23, /*[QU]*/ 2461 U_LB_COMPLEX_CONTEXT = 24, /*[SA]*/ 2462 U_LB_SURROGATE = 25, /*[SG]*/ 2463 U_LB_SPACE = 26, /*[SP]*/ 2464 U_LB_BREAK_SYMBOLS = 27, /*[SY]*/ 2465 U_LB_ZWSPACE = 28, /*[ZW]*/ 2466 /** @stable ICU 2.6 */ 2467 U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4/ICU 2.6 */ 2468 /** @stable ICU 2.6 */ 2469 U_LB_WORD_JOINER = 30, /*[WJ]*/ 2470 /** @stable ICU 3.4 */ 2471 U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4.1/ICU 3.4 */ 2472 /** @stable ICU 3.4 */ 2473 U_LB_H3 = 32, /*[H3]*/ 2474 /** @stable ICU 3.4 */ 2475 U_LB_JL = 33, /*[JL]*/ 2476 /** @stable ICU 3.4 */ 2477 U_LB_JT = 34, /*[JT]*/ 2478 /** @stable ICU 3.4 */ 2479 U_LB_JV = 35, /*[JV]*/ 2480 /** @stable ICU 4.4 */ 2481 U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */ 2482 /** @stable ICU 49 */ 2483 U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/ICU 49 */ 2484 /** @stable ICU 49 */ 2485 U_LB_HEBREW_LETTER = 38, /*[HL]*/ /* new in Unicode 6.1/ICU 49 */ 2486 /** @stable ICU 50 */ 2487 U_LB_REGIONAL_INDICATOR = 39,/*[RI]*/ /* new in Unicode 6.2/ICU 50 */ 2488 /** @stable ICU 58 */ 2489 U_LB_E_BASE = 40, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */ 2490 /** @stable ICU 58 */ 2491 U_LB_E_MODIFIER = 41, /*[EM]*/ 2492 /** @stable ICU 58 */ 2493 U_LB_ZWJ = 42, /*[ZWJ]*/ 2494 /** @stable ICU 74 */ 2495 U_LB_AKSARA = 43, /*[AK]*/ 2496 /** @stable ICU 74 */ 2497 U_LB_AKSARA_PREBASE = 44, /*[AP]*/ 2498 /** @stable ICU 74 */ 2499 U_LB_AKSARA_START = 45, /*[AS]*/ 2500 /** @stable ICU 74 */ 2501 U_LB_VIRAMA_FINAL = 46, /*[VF]*/ 2502 /** @stable ICU 74 */ 2503 U_LB_VIRAMA = 47, /*[VI]*/ 2504 #ifndef U_HIDE_DEPRECATED_API 2505 /** 2506 * One more than the highest normal ULineBreak value. 2507 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_LINE_BREAK). 2508 * 2509 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2510 */ 2511 U_LB_COUNT = 48 2512 #endif // U_HIDE_DEPRECATED_API 2513 } ULineBreak; 2514 2515 /** 2516 * Numeric Type constants. 2517 * 2518 * @see UCHAR_NUMERIC_TYPE 2519 * @stable ICU 2.2 2520 */ 2521 typedef enum UNumericType { 2522 /* 2523 * Note: UNumericType constants are parsed by preparseucd.py. 2524 * It matches lines like 2525 * U_NT_<Unicode Numeric_Type value name> 2526 */ 2527 2528 U_NT_NONE, /*[None]*/ 2529 U_NT_DECIMAL, /*[de]*/ 2530 U_NT_DIGIT, /*[di]*/ 2531 U_NT_NUMERIC, /*[nu]*/ 2532 #ifndef U_HIDE_DEPRECATED_API 2533 /** 2534 * One more than the highest normal UNumericType value. 2535 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_NUMERIC_TYPE). 2536 * 2537 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2538 */ 2539 U_NT_COUNT 2540 #endif // U_HIDE_DEPRECATED_API 2541 } UNumericType; 2542 2543 /** 2544 * Hangul Syllable Type constants. 2545 * 2546 * @see UCHAR_HANGUL_SYLLABLE_TYPE 2547 * @stable ICU 2.6 2548 */ 2549 typedef enum UHangulSyllableType { 2550 /* 2551 * Note: UHangulSyllableType constants are parsed by preparseucd.py. 2552 * It matches lines like 2553 * U_HST_<Unicode Hangul_Syllable_Type value name> 2554 */ 2555 2556 U_HST_NOT_APPLICABLE, /*[NA]*/ 2557 U_HST_LEADING_JAMO, /*[L]*/ 2558 U_HST_VOWEL_JAMO, /*[V]*/ 2559 U_HST_TRAILING_JAMO, /*[T]*/ 2560 U_HST_LV_SYLLABLE, /*[LV]*/ 2561 U_HST_LVT_SYLLABLE, /*[LVT]*/ 2562 #ifndef U_HIDE_DEPRECATED_API 2563 /** 2564 * One more than the highest normal UHangulSyllableType value. 2565 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_HANGUL_SYLLABLE_TYPE). 2566 * 2567 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. 2568 */ 2569 U_HST_COUNT 2570 #endif // U_HIDE_DEPRECATED_API 2571 } UHangulSyllableType; 2572 2573 /** 2574 * Indic Positional Category constants. 2575 * 2576 * @see UCHAR_INDIC_POSITIONAL_CATEGORY 2577 * @stable ICU 63 2578 */ 2579 typedef enum UIndicPositionalCategory { 2580 /* 2581 * Note: UIndicPositionalCategory constants are parsed by preparseucd.py. 2582 * It matches lines like 2583 * U_INPC_<Unicode Indic_Positional_Category value name> 2584 */ 2585 2586 /** @stable ICU 63 */ 2587 U_INPC_NA, 2588 /** @stable ICU 63 */ 2589 U_INPC_BOTTOM, 2590 /** @stable ICU 63 */ 2591 U_INPC_BOTTOM_AND_LEFT, 2592 /** @stable ICU 63 */ 2593 U_INPC_BOTTOM_AND_RIGHT, 2594 /** @stable ICU 63 */ 2595 U_INPC_LEFT, 2596 /** @stable ICU 63 */ 2597 U_INPC_LEFT_AND_RIGHT, 2598 /** @stable ICU 63 */ 2599 U_INPC_OVERSTRUCK, 2600 /** @stable ICU 63 */ 2601 U_INPC_RIGHT, 2602 /** @stable ICU 63 */ 2603 U_INPC_TOP, 2604 /** @stable ICU 63 */ 2605 U_INPC_TOP_AND_BOTTOM, 2606 /** @stable ICU 63 */ 2607 U_INPC_TOP_AND_BOTTOM_AND_RIGHT, 2608 /** @stable ICU 63 */ 2609 U_INPC_TOP_AND_LEFT, 2610 /** @stable ICU 63 */ 2611 U_INPC_TOP_AND_LEFT_AND_RIGHT, 2612 /** @stable ICU 63 */ 2613 U_INPC_TOP_AND_RIGHT, 2614 /** @stable ICU 63 */ 2615 U_INPC_VISUAL_ORDER_LEFT, 2616 /** @stable ICU 66 */ 2617 U_INPC_TOP_AND_BOTTOM_AND_LEFT, 2618 } UIndicPositionalCategory; 2619 2620 /** 2621 * Indic Syllabic Category constants. 2622 * 2623 * @see UCHAR_INDIC_SYLLABIC_CATEGORY 2624 * @stable ICU 63 2625 */ 2626 typedef enum UIndicSyllabicCategory { 2627 /* 2628 * Note: UIndicSyllabicCategory constants are parsed by preparseucd.py. 2629 * It matches lines like 2630 * U_INSC_<Unicode Indic_Syllabic_Category value name> 2631 */ 2632 2633 /** @stable ICU 63 */ 2634 U_INSC_OTHER, 2635 /** @stable ICU 63 */ 2636 U_INSC_AVAGRAHA, 2637 /** @stable ICU 63 */ 2638 U_INSC_BINDU, 2639 /** @stable ICU 63 */ 2640 U_INSC_BRAHMI_JOINING_NUMBER, 2641 /** @stable ICU 63 */ 2642 U_INSC_CANTILLATION_MARK, 2643 /** @stable ICU 63 */ 2644 U_INSC_CONSONANT, 2645 /** @stable ICU 63 */ 2646 U_INSC_CONSONANT_DEAD, 2647 /** @stable ICU 63 */ 2648 U_INSC_CONSONANT_FINAL, 2649 /** @stable ICU 63 */ 2650 U_INSC_CONSONANT_HEAD_LETTER, 2651 /** @stable ICU 63 */ 2652 U_INSC_CONSONANT_INITIAL_POSTFIXED, 2653 /** @stable ICU 63 */ 2654 U_INSC_CONSONANT_KILLER, 2655 /** @stable ICU 63 */ 2656 U_INSC_CONSONANT_MEDIAL, 2657 /** @stable ICU 63 */ 2658 U_INSC_CONSONANT_PLACEHOLDER, 2659 /** @stable ICU 63 */ 2660 U_INSC_CONSONANT_PRECEDING_REPHA, 2661 /** @stable ICU 63 */ 2662 U_INSC_CONSONANT_PREFIXED, 2663 /** @stable ICU 63 */ 2664 U_INSC_CONSONANT_SUBJOINED, 2665 /** @stable ICU 63 */ 2666 U_INSC_CONSONANT_SUCCEEDING_REPHA, 2667 /** @stable ICU 63 */ 2668 U_INSC_CONSONANT_WITH_STACKER, 2669 /** @stable ICU 63 */ 2670 U_INSC_GEMINATION_MARK, 2671 /** @stable ICU 63 */ 2672 U_INSC_INVISIBLE_STACKER, 2673 /** @stable ICU 63 */ 2674 U_INSC_JOINER, 2675 /** @stable ICU 63 */ 2676 U_INSC_MODIFYING_LETTER, 2677 /** @stable ICU 63 */ 2678 U_INSC_NON_JOINER, 2679 /** @stable ICU 63 */ 2680 U_INSC_NUKTA, 2681 /** @stable ICU 63 */ 2682 U_INSC_NUMBER, 2683 /** @stable ICU 63 */ 2684 U_INSC_NUMBER_JOINER, 2685 /** @stable ICU 63 */ 2686 U_INSC_PURE_KILLER, 2687 /** @stable ICU 63 */ 2688 U_INSC_REGISTER_SHIFTER, 2689 /** @stable ICU 63 */ 2690 U_INSC_SYLLABLE_MODIFIER, 2691 /** @stable ICU 63 */ 2692 U_INSC_TONE_LETTER, 2693 /** @stable ICU 63 */ 2694 U_INSC_TONE_MARK, 2695 /** @stable ICU 63 */ 2696 U_INSC_VIRAMA, 2697 /** @stable ICU 63 */ 2698 U_INSC_VISARGA, 2699 /** @stable ICU 63 */ 2700 U_INSC_VOWEL, 2701 /** @stable ICU 63 */ 2702 U_INSC_VOWEL_DEPENDENT, 2703 /** @stable ICU 63 */ 2704 U_INSC_VOWEL_INDEPENDENT, 2705 } UIndicSyllabicCategory; 2706 2707 /** 2708 * Vertical Orientation constants. 2709 * 2710 * @see UCHAR_VERTICAL_ORIENTATION 2711 * @stable ICU 63 2712 */ 2713 typedef enum UVerticalOrientation { 2714 /* 2715 * Note: UVerticalOrientation constants are parsed by preparseucd.py. 2716 * It matches lines like 2717 * U_VO_<Unicode Vertical_Orientation value name> 2718 */ 2719 2720 /** @stable ICU 63 */ 2721 U_VO_ROTATED, 2722 /** @stable ICU 63 */ 2723 U_VO_TRANSFORMED_ROTATED, 2724 /** @stable ICU 63 */ 2725 U_VO_TRANSFORMED_UPRIGHT, 2726 /** @stable ICU 63 */ 2727 U_VO_UPRIGHT, 2728 } UVerticalOrientation; 2729 2730 #ifndef U_HIDE_DRAFT_API 2731 /** 2732 * Identifier Status constants. 2733 * See https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type. 2734 * 2735 * @see UCHAR_IDENTIFIER_STATUS 2736 * @draft ICU 75 2737 */ 2738 typedef enum UIdentifierStatus { 2739 /* 2740 * Note: UIdentifierStatus constants are parsed by preparseucd.py. 2741 * It matches lines like 2742 * U_ID_STATUS_<Unicode Identifier_Status value name> 2743 */ 2744 2745 /** @draft ICU 75 */ 2746 U_ID_STATUS_RESTRICTED, 2747 /** @draft ICU 75 */ 2748 U_ID_STATUS_ALLOWED, 2749 } UIdentifierStatus; 2750 2751 /** 2752 * Identifier Type constants. 2753 * See https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type. 2754 * 2755 * @see UCHAR_IDENTIFIER_TYPE 2756 * @draft ICU 75 2757 */ 2758 typedef enum UIdentifierType { 2759 /* 2760 * Note: UIdentifierType constants are parsed by preparseucd.py. 2761 * It matches lines like 2762 * U_ID_TYPE_<Unicode Identifier_Type value name> 2763 */ 2764 2765 /** @draft ICU 75 */ 2766 U_ID_TYPE_NOT_CHARACTER, 2767 /** @draft ICU 75 */ 2768 U_ID_TYPE_DEPRECATED, 2769 /** @draft ICU 75 */ 2770 U_ID_TYPE_DEFAULT_IGNORABLE, 2771 /** @draft ICU 75 */ 2772 U_ID_TYPE_NOT_NFKC, 2773 /** @draft ICU 75 */ 2774 U_ID_TYPE_NOT_XID, 2775 /** @draft ICU 75 */ 2776 U_ID_TYPE_EXCLUSION, 2777 /** @draft ICU 75 */ 2778 U_ID_TYPE_OBSOLETE, 2779 /** @draft ICU 75 */ 2780 U_ID_TYPE_TECHNICAL, 2781 /** @draft ICU 75 */ 2782 U_ID_TYPE_UNCOMMON_USE, 2783 /** @draft ICU 75 */ 2784 U_ID_TYPE_LIMITED_USE, 2785 /** @draft ICU 75 */ 2786 U_ID_TYPE_INCLUSION, 2787 /** @draft ICU 75 */ 2788 U_ID_TYPE_RECOMMENDED, 2789 } UIdentifierType; 2790 #endif // U_HIDE_DRAFT_API 2791 2792 /** 2793 * Check a binary Unicode property for a code point. 2794 * 2795 * Unicode, especially in version 3.2, defines many more properties than the 2796 * original set in UnicodeData.txt. 2797 * 2798 * The properties APIs are intended to reflect Unicode properties as defined 2799 * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). 2800 * For details about the properties see http://www.unicode.org/ucd/ . 2801 * For names of Unicode properties see the UCD file PropertyAliases.txt. 2802 * 2803 * Important: If ICU is built with UCD files from Unicode versions below 3.2, 2804 * then properties marked with "new in Unicode 3.2" are not or not fully available. 2805 * 2806 * @param c Code point to test. 2807 * @param which UProperty selector constant, identifies which binary property to check. 2808 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT. 2809 * @return true or false according to the binary Unicode property value for c. 2810 * Also false if 'which' is out of bounds or if the Unicode version 2811 * does not have data for the property at all. 2812 * 2813 * @see UProperty 2814 * @see u_getBinaryPropertySet 2815 * @see u_getIntPropertyValue 2816 * @see u_getUnicodeVersion 2817 * @stable ICU 2.1 2818 */ 2819 U_CAPI UBool U_EXPORT2 2820 u_hasBinaryProperty(UChar32 c, UProperty which); 2821 2822 /** 2823 * Returns true if the property is true for the string. 2824 * Same as u_hasBinaryProperty(single code point, which) 2825 * if the string contains exactly one code point. 2826 * 2827 * Most properties apply only to single code points. 2828 * <a href="https://www.unicode.org/reports/tr51/#Emoji_Sets">UTS #51 Unicode Emoji</a> 2829 * defines several properties of strings. 2830 * 2831 * @param s String to test. 2832 * @param length Length of the string, or negative if NUL-terminated. 2833 * @param which UProperty selector constant, identifies which binary property to check. 2834 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT. 2835 * @return true or false according to the binary Unicode property value for the string. 2836 * Also false if 'which' is out of bounds or if the Unicode version 2837 * does not have data for the property at all. 2838 * 2839 * @see UProperty 2840 * @see u_hasBinaryProperty 2841 * @see u_getBinaryPropertySet 2842 * @see u_getIntPropertyValue 2843 * @see u_getUnicodeVersion 2844 * @stable ICU 70 2845 */ 2846 U_CAPI UBool U_EXPORT2 2847 u_stringHasBinaryProperty(const UChar *s, int32_t length, UProperty which); 2848 2849 /** 2850 * Returns a frozen USet for a binary property. 2851 * The library retains ownership over the returned object. 2852 * Sets an error code if the property number is not one for a binary property. 2853 * 2854 * The returned set contains all code points for which the property is true. 2855 * 2856 * @param property UCHAR_BINARY_START..UCHAR_BINARY_LIMIT-1 2857 * @param pErrorCode an in/out ICU UErrorCode 2858 * @return the property as a set 2859 * @see UProperty 2860 * @see u_hasBinaryProperty 2861 * @see Unicode::fromUSet 2862 * @stable ICU 63 2863 */ 2864 U_CAPI const USet * U_EXPORT2 2865 u_getBinaryPropertySet(UProperty property, UErrorCode *pErrorCode); 2866 2867 /** 2868 * Check if a code point has the Alphabetic Unicode property. 2869 * Same as u_hasBinaryProperty(c, UCHAR_ALPHABETIC). 2870 * This is different from u_isalpha! 2871 * @param c Code point to test 2872 * @return true if the code point has the Alphabetic Unicode property, false otherwise 2873 * 2874 * @see UCHAR_ALPHABETIC 2875 * @see u_isalpha 2876 * @see u_hasBinaryProperty 2877 * @stable ICU 2.1 2878 */ 2879 U_CAPI UBool U_EXPORT2 2880 u_isUAlphabetic(UChar32 c); 2881 2882 /** 2883 * Check if a code point has the Lowercase Unicode property. 2884 * Same as u_hasBinaryProperty(c, UCHAR_LOWERCASE). 2885 * This is different from u_islower! 2886 * @param c Code point to test 2887 * @return true if the code point has the Lowercase Unicode property, false otherwise 2888 * 2889 * @see UCHAR_LOWERCASE 2890 * @see u_islower 2891 * @see u_hasBinaryProperty 2892 * @stable ICU 2.1 2893 */ 2894 U_CAPI UBool U_EXPORT2 2895 u_isULowercase(UChar32 c); 2896 2897 /** 2898 * Check if a code point has the Uppercase Unicode property. 2899 * Same as u_hasBinaryProperty(c, UCHAR_UPPERCASE). 2900 * This is different from u_isupper! 2901 * @param c Code point to test 2902 * @return true if the code point has the Uppercase Unicode property, false otherwise 2903 * 2904 * @see UCHAR_UPPERCASE 2905 * @see u_isupper 2906 * @see u_hasBinaryProperty 2907 * @stable ICU 2.1 2908 */ 2909 U_CAPI UBool U_EXPORT2 2910 u_isUUppercase(UChar32 c); 2911 2912 /** 2913 * Check if a code point has the White_Space Unicode property. 2914 * Same as u_hasBinaryProperty(c, UCHAR_WHITE_SPACE). 2915 * This is different from both u_isspace and u_isWhitespace! 2916 * 2917 * Note: There are several ICU whitespace functions; please see the uchar.h 2918 * file documentation for a detailed comparison. 2919 * 2920 * @param c Code point to test 2921 * @return true if the code point has the White_Space Unicode property, false otherwise. 2922 * 2923 * @see UCHAR_WHITE_SPACE 2924 * @see u_isWhitespace 2925 * @see u_isspace 2926 * @see u_isJavaSpaceChar 2927 * @see u_hasBinaryProperty 2928 * @stable ICU 2.1 2929 */ 2930 U_CAPI UBool U_EXPORT2 2931 u_isUWhiteSpace(UChar32 c); 2932 2933 /** 2934 * Get the property value for an enumerated or integer Unicode property for a code point. 2935 * Also returns binary and mask property values. 2936 * 2937 * Unicode, especially in version 3.2, defines many more properties than the 2938 * original set in UnicodeData.txt. 2939 * 2940 * The properties APIs are intended to reflect Unicode properties as defined 2941 * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). 2942 * For details about the properties see http://www.unicode.org/ . 2943 * For names of Unicode properties see the UCD file PropertyAliases.txt. 2944 * 2945 * Sample usage: 2946 * UEastAsianWidth ea=(UEastAsianWidth)u_getIntPropertyValue(c, UCHAR_EAST_ASIAN_WIDTH); 2947 * UBool b=(UBool)u_getIntPropertyValue(c, UCHAR_IDEOGRAPHIC); 2948 * 2949 * @param c Code point to test. 2950 * @param which UProperty selector constant, identifies which property to check. 2951 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT 2952 * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT 2953 * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. 2954 * @return Numeric value that is directly the property value or, 2955 * for enumerated properties, corresponds to the numeric value of the enumerated 2956 * constant of the respective property value enumeration type 2957 * (cast to enum type if necessary). 2958 * Returns 0 or 1 (for false/true) for binary Unicode properties. 2959 * Returns a bit-mask for mask properties. 2960 * Returns 0 if 'which' is out of bounds or if the Unicode version 2961 * does not have data for the property at all, or not for this code point. 2962 * 2963 * @see UProperty 2964 * @see u_hasBinaryProperty 2965 * @see u_getIntPropertyMinValue 2966 * @see u_getIntPropertyMaxValue 2967 * @see u_getIntPropertyMap 2968 * @see u_getUnicodeVersion 2969 * @stable ICU 2.2 2970 */ 2971 U_CAPI int32_t U_EXPORT2 2972 u_getIntPropertyValue(UChar32 c, UProperty which); 2973 2974 /** 2975 * Get the minimum value for an enumerated/integer/binary Unicode property. 2976 * Can be used together with u_getIntPropertyMaxValue 2977 * to allocate arrays of UnicodeSet or similar. 2978 * 2979 * @param which UProperty selector constant, identifies which binary property to check. 2980 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT 2981 * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT. 2982 * @return Minimum value returned by u_getIntPropertyValue for a Unicode property. 2983 * 0 if the property selector is out of range. 2984 * 2985 * @see UProperty 2986 * @see u_hasBinaryProperty 2987 * @see u_getUnicodeVersion 2988 * @see u_getIntPropertyMaxValue 2989 * @see u_getIntPropertyValue 2990 * @stable ICU 2.2 2991 */ 2992 U_CAPI int32_t U_EXPORT2 2993 u_getIntPropertyMinValue(UProperty which); 2994 2995 /** 2996 * Get the maximum value for an enumerated/integer/binary Unicode property. 2997 * Can be used together with u_getIntPropertyMinValue 2998 * to allocate arrays of UnicodeSet or similar. 2999 * 3000 * Examples for min/max values (for Unicode 3.2): 3001 * 3002 * - UCHAR_BIDI_CLASS: 0/18 (U_LEFT_TO_RIGHT/U_BOUNDARY_NEUTRAL) 3003 * - UCHAR_SCRIPT: 0/45 (USCRIPT_COMMON/USCRIPT_TAGBANWA) 3004 * - UCHAR_IDEOGRAPHIC: 0/1 (false/true) 3005 * 3006 * For undefined UProperty constant values, min/max values will be 0/-1. 3007 * 3008 * @param which UProperty selector constant, identifies which binary property to check. 3009 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT 3010 * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT. 3011 * @return Maximum value returned by u_getIntPropertyValue for a Unicode property. 3012 * <=0 if the property selector is out of range. 3013 * 3014 * @see UProperty 3015 * @see u_hasBinaryProperty 3016 * @see u_getUnicodeVersion 3017 * @see u_getIntPropertyMaxValue 3018 * @see u_getIntPropertyValue 3019 * @stable ICU 2.2 3020 */ 3021 U_CAPI int32_t U_EXPORT2 3022 u_getIntPropertyMaxValue(UProperty which); 3023 3024 /** 3025 * Returns an immutable UCPMap for an enumerated/catalog/int-valued property. 3026 * The library retains ownership over the returned object. 3027 * Sets an error code if the property number is not one for an "int property". 3028 * 3029 * The returned object maps all Unicode code points to their values for that property. 3030 * For documentation of the integer values see u_getIntPropertyValue(). 3031 * 3032 * @param property UCHAR_INT_START..UCHAR_INT_LIMIT-1 3033 * @param pErrorCode an in/out ICU UErrorCode 3034 * @return the property as a map 3035 * @see UProperty 3036 * @see u_getIntPropertyValue 3037 * @stable ICU 63 3038 */ 3039 U_CAPI const UCPMap * U_EXPORT2 3040 u_getIntPropertyMap(UProperty property, UErrorCode *pErrorCode); 3041 3042 /** 3043 * Get the numeric value for a Unicode code point as defined in the 3044 * Unicode Character Database. 3045 * 3046 * A "double" return type is necessary because 3047 * some numeric values are fractions, negative, or too large for int32_t. 3048 * 3049 * For characters without any numeric values in the Unicode Character Database, 3050 * this function will return U_NO_NUMERIC_VALUE. 3051 * Note: This is different from the Unicode Standard which specifies NaN as the default value. 3052 * (NaN is not available on all platforms.) 3053 * 3054 * Similar to java.lang.Character.getNumericValue(), but u_getNumericValue() 3055 * also supports negative values, large values, and fractions, 3056 * while Java's getNumericValue() returns values 10..35 for ASCII letters. 3057 * 3058 * @param c Code point to get the numeric value for. 3059 * @return Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined. 3060 * 3061 * @see U_NO_NUMERIC_VALUE 3062 * @stable ICU 2.2 3063 */ 3064 U_CAPI double U_EXPORT2 3065 u_getNumericValue(UChar32 c); 3066 3067 /** 3068 * Special value that is returned by u_getNumericValue when 3069 * no numeric value is defined for a code point. 3070 * 3071 * @see u_getNumericValue 3072 * @stable ICU 2.2 3073 */ 3074 #define U_NO_NUMERIC_VALUE ((double)-123456789.) 3075 3076 /** 3077 * Determines whether the specified code point has the general category "Ll" 3078 * (lowercase letter). 3079 * 3080 * Same as java.lang.Character.isLowerCase(). 3081 * 3082 * This misses some characters that are also lowercase but 3083 * have a different general category value. 3084 * In order to include those, use UCHAR_LOWERCASE. 3085 * 3086 * In addition to being equivalent to a Java function, this also serves 3087 * as a C/POSIX migration function. 3088 * See the comments about C/POSIX character classification functions in the 3089 * documentation at the top of this header file. 3090 * 3091 * @param c the code point to be tested 3092 * @return true if the code point is an Ll lowercase letter 3093 * 3094 * @see UCHAR_LOWERCASE 3095 * @see u_isupper 3096 * @see u_istitle 3097 * @stable ICU 2.0 3098 */ 3099 U_CAPI UBool U_EXPORT2 3100 u_islower(UChar32 c); 3101 3102 /** 3103 * Determines whether the specified code point has the general category "Lu" 3104 * (uppercase letter). 3105 * 3106 * Same as java.lang.Character.isUpperCase(). 3107 * 3108 * This misses some characters that are also uppercase but 3109 * have a different general category value. 3110 * In order to include those, use UCHAR_UPPERCASE. 3111 * 3112 * In addition to being equivalent to a Java function, this also serves 3113 * as a C/POSIX migration function. 3114 * See the comments about C/POSIX character classification functions in the 3115 * documentation at the top of this header file. 3116 * 3117 * @param c the code point to be tested 3118 * @return true if the code point is an Lu uppercase letter 3119 * 3120 * @see UCHAR_UPPERCASE 3121 * @see u_islower 3122 * @see u_istitle 3123 * @see u_tolower 3124 * @stable ICU 2.0 3125 */ 3126 U_CAPI UBool U_EXPORT2 3127 u_isupper(UChar32 c); 3128 3129 /** 3130 * Determines whether the specified code point is a titlecase letter. 3131 * True for general category "Lt" (titlecase letter). 3132 * 3133 * Same as java.lang.Character.isTitleCase(). 3134 * 3135 * @param c the code point to be tested 3136 * @return true if the code point is an Lt titlecase letter 3137 * 3138 * @see u_isupper 3139 * @see u_islower 3140 * @see u_totitle 3141 * @stable ICU 2.0 3142 */ 3143 U_CAPI UBool U_EXPORT2 3144 u_istitle(UChar32 c); 3145 3146 /** 3147 * Determines whether the specified code point is a digit character according to Java. 3148 * True for characters with general category "Nd" (decimal digit numbers). 3149 * Beginning with Unicode 4, this is the same as 3150 * testing for the Numeric_Type of Decimal. 3151 * 3152 * Same as java.lang.Character.isDigit(). 3153 * 3154 * In addition to being equivalent to a Java function, this also serves 3155 * as a C/POSIX migration function. 3156 * See the comments about C/POSIX character classification functions in the 3157 * documentation at the top of this header file. 3158 * 3159 * @param c the code point to be tested 3160 * @return true if the code point is a digit character according to Character.isDigit() 3161 * 3162 * @stable ICU 2.0 3163 */ 3164 U_CAPI UBool U_EXPORT2 3165 u_isdigit(UChar32 c); 3166 3167 /** 3168 * Determines whether the specified code point is a letter character. 3169 * True for general categories "L" (letters). 3170 * 3171 * Same as java.lang.Character.isLetter(). 3172 * 3173 * In addition to being equivalent to a Java function, this also serves 3174 * as a C/POSIX migration function. 3175 * See the comments about C/POSIX character classification functions in the 3176 * documentation at the top of this header file. 3177 * 3178 * @param c the code point to be tested 3179 * @return true if the code point is a letter character 3180 * 3181 * @see u_isdigit 3182 * @see u_isalnum 3183 * @stable ICU 2.0 3184 */ 3185 U_CAPI UBool U_EXPORT2 3186 u_isalpha(UChar32 c); 3187 3188 /** 3189 * Determines whether the specified code point is an alphanumeric character 3190 * (letter or digit) according to Java. 3191 * True for characters with general categories 3192 * "L" (letters) and "Nd" (decimal digit numbers). 3193 * 3194 * Same as java.lang.Character.isLetterOrDigit(). 3195 * 3196 * In addition to being equivalent to a Java function, this also serves 3197 * as a C/POSIX migration function. 3198 * See the comments about C/POSIX character classification functions in the 3199 * documentation at the top of this header file. 3200 * 3201 * @param c the code point to be tested 3202 * @return true if the code point is an alphanumeric character according to Character.isLetterOrDigit() 3203 * 3204 * @stable ICU 2.0 3205 */ 3206 U_CAPI UBool U_EXPORT2 3207 u_isalnum(UChar32 c); 3208 3209 /** 3210 * Determines whether the specified code point is a hexadecimal digit. 3211 * This is equivalent to u_digit(c, 16)>=0. 3212 * True for characters with general category "Nd" (decimal digit numbers) 3213 * as well as Latin letters a-f and A-F in both ASCII and Fullwidth ASCII. 3214 * (That is, for letters with code points 3215 * 0041..0046, 0061..0066, FF21..FF26, FF41..FF46.) 3216 * 3217 * In order to narrow the definition of hexadecimal digits to only ASCII 3218 * characters, use (c<=0x7f && u_isxdigit(c)). 3219 * 3220 * This is a C/POSIX migration function. 3221 * See the comments about C/POSIX character classification functions in the 3222 * documentation at the top of this header file. 3223 * 3224 * @param c the code point to be tested 3225 * @return true if the code point is a hexadecimal digit 3226 * 3227 * @stable ICU 2.6 3228 */ 3229 U_CAPI UBool U_EXPORT2 3230 u_isxdigit(UChar32 c); 3231 3232 /** 3233 * Determines whether the specified code point is a punctuation character. 3234 * True for characters with general categories "P" (punctuation). 3235 * 3236 * This is a C/POSIX migration function. 3237 * See the comments about C/POSIX character classification functions in the 3238 * documentation at the top of this header file. 3239 * 3240 * @param c the code point to be tested 3241 * @return true if the code point is a punctuation character 3242 * 3243 * @stable ICU 2.6 3244 */ 3245 U_CAPI UBool U_EXPORT2 3246 u_ispunct(UChar32 c); 3247 3248 /** 3249 * Determines whether the specified code point is a "graphic" character 3250 * (printable, excluding spaces). 3251 * true for all characters except those with general categories 3252 * "Cc" (control codes), "Cf" (format controls), "Cs" (surrogates), 3253 * "Cn" (unassigned), and "Z" (separators). 3254 * 3255 * This is a C/POSIX migration function. 3256 * See the comments about C/POSIX character classification functions in the 3257 * documentation at the top of this header file. 3258 * 3259 * @param c the code point to be tested 3260 * @return true if the code point is a "graphic" character 3261 * 3262 * @stable ICU 2.6 3263 */ 3264 U_CAPI UBool U_EXPORT2 3265 u_isgraph(UChar32 c); 3266 3267 /** 3268 * Determines whether the specified code point is a "blank" or "horizontal space", 3269 * a character that visibly separates words on a line. 3270 * The following are equivalent definitions: 3271 * 3272 * true for Unicode White_Space characters except for "vertical space controls" 3273 * where "vertical space controls" are the following characters: 3274 * U+000A (LF) U+000B (VT) U+000C (FF) U+000D (CR) U+0085 (NEL) U+2028 (LS) U+2029 (PS) 3275 * 3276 * same as 3277 * 3278 * true for U+0009 (TAB) and characters with general category "Zs" (space separators). 3279 * 3280 * Note: There are several ICU whitespace functions; please see the uchar.h 3281 * file documentation for a detailed comparison. 3282 * 3283 * This is a C/POSIX migration function. 3284 * See the comments about C/POSIX character classification functions in the 3285 * documentation at the top of this header file. 3286 * 3287 * @param c the code point to be tested 3288 * @return true if the code point is a "blank" 3289 * 3290 * @stable ICU 2.6 3291 */ 3292 U_CAPI UBool U_EXPORT2 3293 u_isblank(UChar32 c); 3294 3295 /** 3296 * Determines whether the specified code point is "defined", 3297 * which usually means that it is assigned a character. 3298 * True for general categories other than "Cn" (other, not assigned), 3299 * i.e., true for all code points mentioned in UnicodeData.txt. 3300 * 3301 * Note that non-character code points (e.g., U+FDD0) are not "defined" 3302 * (they are Cn), but surrogate code points are "defined" (Cs). 3303 * 3304 * Same as java.lang.Character.isDefined(). 3305 * 3306 * @param c the code point to be tested 3307 * @return true if the code point is assigned a character 3308 * 3309 * @see u_isdigit 3310 * @see u_isalpha 3311 * @see u_isalnum 3312 * @see u_isupper 3313 * @see u_islower 3314 * @see u_istitle 3315 * @stable ICU 2.0 3316 */ 3317 U_CAPI UBool U_EXPORT2 3318 u_isdefined(UChar32 c); 3319 3320 /** 3321 * Determines if the specified character is a space character or not. 3322 * 3323 * Note: There are several ICU whitespace functions; please see the uchar.h 3324 * file documentation for a detailed comparison. 3325 * 3326 * This is a C/POSIX migration function. 3327 * See the comments about C/POSIX character classification functions in the 3328 * documentation at the top of this header file. 3329 * 3330 * @param c the character to be tested 3331 * @return true if the character is a space character; false otherwise. 3332 * 3333 * @see u_isJavaSpaceChar 3334 * @see u_isWhitespace 3335 * @see u_isUWhiteSpace 3336 * @stable ICU 2.0 3337 */ 3338 U_CAPI UBool U_EXPORT2 3339 u_isspace(UChar32 c); 3340 3341 /** 3342 * Determine if the specified code point is a space character according to Java. 3343 * True for characters with general categories "Z" (separators), 3344 * which does not include control codes (e.g., TAB or Line Feed). 3345 * 3346 * Same as java.lang.Character.isSpaceChar(). 3347 * 3348 * Note: There are several ICU whitespace functions; please see the uchar.h 3349 * file documentation for a detailed comparison. 3350 * 3351 * @param c the code point to be tested 3352 * @return true if the code point is a space character according to Character.isSpaceChar() 3353 * 3354 * @see u_isspace 3355 * @see u_isWhitespace 3356 * @see u_isUWhiteSpace 3357 * @stable ICU 2.6 3358 */ 3359 U_CAPI UBool U_EXPORT2 3360 u_isJavaSpaceChar(UChar32 c); 3361 3362 /** 3363 * Determines if the specified code point is a whitespace character according to Java/ICU. 3364 * A character is considered to be a Java whitespace character if and only 3365 * if it satisfies one of the following criteria: 3366 * 3367 * - It is a Unicode Separator character (categories "Z" = "Zs" or "Zl" or "Zp"), but is not 3368 * also a non-breaking space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP). 3369 * - It is U+0009 HORIZONTAL TABULATION. 3370 * - It is U+000A LINE FEED. 3371 * - It is U+000B VERTICAL TABULATION. 3372 * - It is U+000C FORM FEED. 3373 * - It is U+000D CARRIAGE RETURN. 3374 * - It is U+001C FILE SEPARATOR. 3375 * - It is U+001D GROUP SEPARATOR. 3376 * - It is U+001E RECORD SEPARATOR. 3377 * - It is U+001F UNIT SEPARATOR. 3378 * 3379 * This API tries to sync with the semantics of Java's 3380 * java.lang.Character.isWhitespace(), but it may not return 3381 * the exact same results because of the Unicode version 3382 * difference. 3383 * 3384 * Note: Unicode 4.0.1 changed U+200B ZERO WIDTH SPACE from a Space Separator (Zs) 3385 * to a Format Control (Cf). Since then, isWhitespace(0x200b) returns false. 3386 * See http://www.unicode.org/versions/Unicode4.0.1/ 3387 * 3388 * Note: There are several ICU whitespace functions; please see the uchar.h 3389 * file documentation for a detailed comparison. 3390 * 3391 * @param c the code point to be tested 3392 * @return true if the code point is a whitespace character according to Java/ICU 3393 * 3394 * @see u_isspace 3395 * @see u_isJavaSpaceChar 3396 * @see u_isUWhiteSpace 3397 * @stable ICU 2.0 3398 */ 3399 U_CAPI UBool U_EXPORT2 3400 u_isWhitespace(UChar32 c); 3401 3402 /** 3403 * Determines whether the specified code point is a control character 3404 * (as defined by this function). 3405 * A control character is one of the following: 3406 * - ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f) 3407 * - U_CONTROL_CHAR (Cc) 3408 * - U_FORMAT_CHAR (Cf) 3409 * - U_LINE_SEPARATOR (Zl) 3410 * - U_PARAGRAPH_SEPARATOR (Zp) 3411 * 3412 * This is a C/POSIX migration function. 3413 * See the comments about C/POSIX character classification functions in the 3414 * documentation at the top of this header file. 3415 * 3416 * @param c the code point to be tested 3417 * @return true if the code point is a control character 3418 * 3419 * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT 3420 * @see u_isprint 3421 * @stable ICU 2.0 3422 */ 3423 U_CAPI UBool U_EXPORT2 3424 u_iscntrl(UChar32 c); 3425 3426 /** 3427 * Determines whether the specified code point is an ISO control code. 3428 * True for U+0000..U+001f and U+007f..U+009f (general category "Cc"). 3429 * 3430 * Same as java.lang.Character.isISOControl(). 3431 * 3432 * @param c the code point to be tested 3433 * @return true if the code point is an ISO control code 3434 * 3435 * @see u_iscntrl 3436 * @stable ICU 2.6 3437 */ 3438 U_CAPI UBool U_EXPORT2 3439 u_isISOControl(UChar32 c); 3440 3441 /** 3442 * Determines whether the specified code point is a printable character. 3443 * True for general categories <em>other</em> than "C" (controls). 3444 * 3445 * This is a C/POSIX migration function. 3446 * See the comments about C/POSIX character classification functions in the 3447 * documentation at the top of this header file. 3448 * 3449 * @param c the code point to be tested 3450 * @return true if the code point is a printable character 3451 * 3452 * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT 3453 * @see u_iscntrl 3454 * @stable ICU 2.0 3455 */ 3456 U_CAPI UBool U_EXPORT2 3457 u_isprint(UChar32 c); 3458 3459 /** 3460 * Non-standard: Determines whether the specified code point is a base character. 3461 * True for general categories "L" (letters), "N" (numbers), 3462 * "Mc" (spacing combining marks), and "Me" (enclosing marks). 3463 * 3464 * Note that this is different from the Unicode Standard definition in 3465 * chapter 3.6, conformance clause D51 “Base character”, 3466 * which defines base characters as the code points with general categories 3467 * Letter (L), Number (N), Punctuation (P), Symbol (S), or Space Separator (Zs). 3468 * 3469 * @param c the code point to be tested 3470 * @return true if the code point is a base character according to this function 3471 * 3472 * @see u_isalpha 3473 * @see u_isdigit 3474 * @stable ICU 2.0 3475 */ 3476 U_CAPI UBool U_EXPORT2 3477 u_isbase(UChar32 c); 3478 3479 /** 3480 * Returns the bidirectional category value for the code point, 3481 * which is used in the Unicode bidirectional algorithm 3482 * (UAX #9 http://www.unicode.org/reports/tr9/). 3483 * Note that some <em>unassigned</em> code points have bidi values 3484 * of R or AL because they are in blocks that are reserved 3485 * for Right-To-Left scripts. 3486 * 3487 * Same as java.lang.Character.getDirectionality() 3488 * 3489 * @param c the code point to be tested 3490 * @return the bidirectional category (UCharDirection) value 3491 * 3492 * @see UCharDirection 3493 * @stable ICU 2.0 3494 */ 3495 U_CAPI UCharDirection U_EXPORT2 3496 u_charDirection(UChar32 c); 3497 3498 /** 3499 * Determines whether the code point has the Bidi_Mirrored property. 3500 * This property is set for characters that are commonly used in 3501 * Right-To-Left contexts and need to be displayed with a "mirrored" 3502 * glyph. 3503 * 3504 * Same as java.lang.Character.isMirrored(). 3505 * Same as UCHAR_BIDI_MIRRORED 3506 * 3507 * @param c the code point to be tested 3508 * @return true if the character has the Bidi_Mirrored property 3509 * 3510 * @see UCHAR_BIDI_MIRRORED 3511 * @stable ICU 2.0 3512 */ 3513 U_CAPI UBool U_EXPORT2 3514 u_isMirrored(UChar32 c); 3515 3516 /** 3517 * Maps the specified character to a "mirror-image" character. 3518 * For characters with the Bidi_Mirrored property, implementations 3519 * sometimes need a "poor man's" mapping to another Unicode 3520 * character (code point) such that the default glyph may serve 3521 * as the mirror-image of the default glyph of the specified 3522 * character. This is useful for text conversion to and from 3523 * codepages with visual order, and for displays without glyph 3524 * selection capabilities. 3525 * 3526 * @param c the code point to be mapped 3527 * @return another Unicode code point that may serve as a mirror-image 3528 * substitute, or c itself if there is no such mapping or c 3529 * does not have the Bidi_Mirrored property 3530 * 3531 * @see UCHAR_BIDI_MIRRORED 3532 * @see u_isMirrored 3533 * @stable ICU 2.0 3534 */ 3535 U_CAPI UChar32 U_EXPORT2 3536 u_charMirror(UChar32 c); 3537 3538 /** 3539 * Maps the specified character to its paired bracket character. 3540 * For Bidi_Paired_Bracket_Type!=None, this is the same as u_charMirror(). 3541 * Otherwise c itself is returned. 3542 * See http://www.unicode.org/reports/tr9/ 3543 * 3544 * @param c the code point to be mapped 3545 * @return the paired bracket code point, 3546 * or c itself if there is no such mapping 3547 * (Bidi_Paired_Bracket_Type=None) 3548 * 3549 * @see UCHAR_BIDI_PAIRED_BRACKET 3550 * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE 3551 * @see u_charMirror 3552 * @stable ICU 52 3553 */ 3554 U_CAPI UChar32 U_EXPORT2 3555 u_getBidiPairedBracket(UChar32 c); 3556 3557 /** 3558 * Returns the general category value for the code point. 3559 * 3560 * Same as java.lang.Character.getType(). 3561 * 3562 * @param c the code point to be tested 3563 * @return the general category (UCharCategory) value 3564 * 3565 * @see UCharCategory 3566 * @stable ICU 2.0 3567 */ 3568 U_CAPI int8_t U_EXPORT2 3569 u_charType(UChar32 c); 3570 3571 /** 3572 * Get a single-bit bit set for the general category of a character. 3573 * This bit set can be compared bitwise with U_GC_SM_MASK, U_GC_L_MASK, etc. 3574 * Same as U_MASK(u_charType(c)). 3575 * 3576 * @param c the code point to be tested 3577 * @return a single-bit mask corresponding to the general category (UCharCategory) value 3578 * 3579 * @see u_charType 3580 * @see UCharCategory 3581 * @see U_GC_CN_MASK 3582 * @stable ICU 2.1 3583 */ 3584 #define U_GET_GC_MASK(c) U_MASK(u_charType(c)) 3585 3586 /** 3587 * Callback from u_enumCharTypes(), is called for each contiguous range 3588 * of code points c (where start<=c<limit) 3589 * with the same Unicode general category ("character type"). 3590 * 3591 * The callback function can stop the enumeration by returning false. 3592 * 3593 * @param context an opaque pointer, as passed into utrie_enum() 3594 * @param start the first code point in a contiguous range with value 3595 * @param limit one past the last code point in a contiguous range with value 3596 * @param type the general category for all code points in [start..limit[ 3597 * @return false to stop the enumeration 3598 * 3599 * @stable ICU 2.1 3600 * @see UCharCategory 3601 * @see u_enumCharTypes 3602 */ 3603 typedef UBool U_CALLCONV 3604 UCharEnumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory type); 3605 3606 /** 3607 * Enumerate efficiently all code points with their Unicode general categories. 3608 * 3609 * This is useful for building data structures (e.g., UnicodeSet's), 3610 * for enumerating all assigned code points (type!=U_UNASSIGNED), etc. 3611 * 3612 * For each contiguous range of code points with a given general category ("character type"), 3613 * the UCharEnumTypeRange function is called. 3614 * Adjacent ranges have different types. 3615 * The Unicode Standard guarantees that the numeric value of the type is 0..31. 3616 * 3617 * @param enumRange a pointer to a function that is called for each contiguous range 3618 * of code points with the same general category 3619 * @param context an opaque pointer that is passed on to the callback function 3620 * 3621 * @stable ICU 2.1 3622 * @see UCharCategory 3623 * @see UCharEnumTypeRange 3624 */ 3625 U_CAPI void U_EXPORT2 3626 u_enumCharTypes(UCharEnumTypeRange *enumRange, const void *context); 3627 3628 #if !UCONFIG_NO_NORMALIZATION 3629 3630 /** 3631 * Returns the combining class of the code point as specified in UnicodeData.txt. 3632 * 3633 * @param c the code point of the character 3634 * @return the combining class of the character 3635 * @stable ICU 2.0 3636 */ 3637 U_CAPI uint8_t U_EXPORT2 3638 u_getCombiningClass(UChar32 c); 3639 3640 #endif 3641 3642 /** 3643 * Returns the decimal digit value of a decimal digit character. 3644 * Such characters have the general category "Nd" (decimal digit numbers) 3645 * and a Numeric_Type of Decimal. 3646 * 3647 * Unlike ICU releases before 2.6, no digit values are returned for any 3648 * Han characters because Han number characters are often used with a special 3649 * Chinese-style number format (with characters for powers of 10 in between) 3650 * instead of in decimal-positional notation. 3651 * Unicode 4 explicitly assigns Han number characters the Numeric_Type 3652 * Numeric instead of Decimal. 3653 * See Jitterbug 1483 for more details. 3654 * 3655 * Use u_getIntPropertyValue(c, UCHAR_NUMERIC_TYPE) and u_getNumericValue() 3656 * for complete numeric Unicode properties. 3657 * 3658 * @param c the code point for which to get the decimal digit value 3659 * @return the decimal digit value of c, 3660 * or -1 if c is not a decimal digit character 3661 * 3662 * @see u_getNumericValue 3663 * @stable ICU 2.0 3664 */ 3665 U_CAPI int32_t U_EXPORT2 3666 u_charDigitValue(UChar32 c); 3667 3668 /** 3669 * Returns the Unicode allocation block that contains the character. 3670 * 3671 * @param c the code point to be tested 3672 * @return the block value (UBlockCode) for c 3673 * 3674 * @see UBlockCode 3675 * @stable ICU 2.0 3676 */ 3677 U_CAPI UBlockCode U_EXPORT2 3678 ublock_getCode(UChar32 c); 3679 3680 /** 3681 * Retrieve the name of a Unicode character. 3682 * Depending on <code>nameChoice</code>, the character name written 3683 * into the buffer is the "modern" name or the name that was defined 3684 * in Unicode version 1.0. 3685 * The name contains only "invariant" characters 3686 * like A-Z, 0-9, space, and '-'. 3687 * Unicode 1.0 names are only retrieved if they are different from the modern 3688 * names and if the data file contains the data for them. gennames may or may 3689 * not be called with a command line option to include 1.0 names in unames.dat. 3690 * 3691 * @param code The character (code point) for which to get the name. 3692 * It must be <code>0<=code<=0x10ffff</code>. 3693 * @param nameChoice Selector for which name to get. 3694 * @param buffer Destination address for copying the name. 3695 * The name will always be zero-terminated. 3696 * If there is no name, then the buffer will be set to the empty string. 3697 * @param bufferLength <code>==sizeof(buffer)</code> 3698 * @param pErrorCode Pointer to a UErrorCode variable; 3699 * check for <code>U_SUCCESS()</code> after <code>u_charName()</code> 3700 * returns. 3701 * @return The length of the name, or 0 if there is no name for this character. 3702 * If the bufferLength is less than or equal to the length, then the buffer 3703 * contains the truncated name and the returned length indicates the full 3704 * length of the name. 3705 * The length does not include the zero-termination. 3706 * 3707 * @see UCharNameChoice 3708 * @see u_charFromName 3709 * @see u_enumCharNames 3710 * @stable ICU 2.0 3711 */ 3712 U_CAPI int32_t U_EXPORT2 3713 u_charName(UChar32 code, UCharNameChoice nameChoice, 3714 char *buffer, int32_t bufferLength, 3715 UErrorCode *pErrorCode); 3716 3717 #ifndef U_HIDE_DEPRECATED_API 3718 /** 3719 * Returns an empty string. 3720 * Used to return the ISO 10646 comment for a character. 3721 * The Unicode ISO_Comment property is deprecated and has no values. 3722 * 3723 * @param c The character (code point) for which to get the ISO comment. 3724 * It must be <code>0<=c<=0x10ffff</code>. 3725 * @param dest Destination address for copying the comment. 3726 * The comment will be zero-terminated if possible. 3727 * If there is no comment, then the buffer will be set to the empty string. 3728 * @param destCapacity <code>==sizeof(dest)</code> 3729 * @param pErrorCode Pointer to a UErrorCode variable; 3730 * check for <code>U_SUCCESS()</code> after <code>u_getISOComment()</code> 3731 * returns. 3732 * @return 0 3733 * 3734 * @deprecated ICU 49 3735 */ 3736 U_DEPRECATED int32_t U_EXPORT2 3737 u_getISOComment(UChar32 c, 3738 char *dest, int32_t destCapacity, 3739 UErrorCode *pErrorCode); 3740 #endif /* U_HIDE_DEPRECATED_API */ 3741 3742 /** 3743 * Find a Unicode character by its name and return its code point value. 3744 * The name is matched exactly and completely. 3745 * If the name does not correspond to a code point, <i>pErrorCode</i> 3746 * is set to <code>U_INVALID_CHAR_FOUND</code>. 3747 * A Unicode 1.0 name is matched only if it differs from the modern name. 3748 * Unicode names are all uppercase. Extended names are lowercase followed 3749 * by an uppercase hexadecimal number, and within angle brackets. 3750 * 3751 * @param nameChoice Selector for which name to match. 3752 * @param name The name to match. 3753 * @param pErrorCode Pointer to a UErrorCode variable 3754 * @return The Unicode value of the code point with the given name, 3755 * or an undefined value if there is no such code point. 3756 * 3757 * @see UCharNameChoice 3758 * @see u_charName 3759 * @see u_enumCharNames 3760 * @stable ICU 1.7 3761 */ 3762 U_CAPI UChar32 U_EXPORT2 3763 u_charFromName(UCharNameChoice nameChoice, 3764 const char *name, 3765 UErrorCode *pErrorCode); 3766 3767 /** 3768 * Type of a callback function for u_enumCharNames() that gets called 3769 * for each Unicode character with the code point value and 3770 * the character name. 3771 * If such a function returns false, then the enumeration is stopped. 3772 * 3773 * @param context The context pointer that was passed to u_enumCharNames(). 3774 * @param code The Unicode code point for the character with this name. 3775 * @param nameChoice Selector for which kind of names is enumerated. 3776 * @param name The character's name, zero-terminated. 3777 * @param length The length of the name. 3778 * @return true if the enumeration should continue, false to stop it. 3779 * 3780 * @see UCharNameChoice 3781 * @see u_enumCharNames 3782 * @stable ICU 1.7 3783 */ 3784 typedef UBool U_CALLCONV UEnumCharNamesFn(void *context, 3785 UChar32 code, 3786 UCharNameChoice nameChoice, 3787 const char *name, 3788 int32_t length); 3789 3790 /** 3791 * Enumerate all assigned Unicode characters between the start and limit 3792 * code points (start inclusive, limit exclusive) and call a function 3793 * for each, passing the code point value and the character name. 3794 * For Unicode 1.0 names, only those are enumerated that differ from the 3795 * modern names. 3796 * 3797 * @param start The first code point in the enumeration range. 3798 * @param limit One more than the last code point in the enumeration range 3799 * (the first one after the range). 3800 * @param fn The function that is to be called for each character name. 3801 * @param context An arbitrary pointer that is passed to the function. 3802 * @param nameChoice Selector for which kind of names to enumerate. 3803 * @param pErrorCode Pointer to a UErrorCode variable 3804 * 3805 * @see UCharNameChoice 3806 * @see UEnumCharNamesFn 3807 * @see u_charName 3808 * @see u_charFromName 3809 * @stable ICU 1.7 3810 */ 3811 U_CAPI void U_EXPORT2 3812 u_enumCharNames(UChar32 start, UChar32 limit, 3813 UEnumCharNamesFn *fn, 3814 void *context, 3815 UCharNameChoice nameChoice, 3816 UErrorCode *pErrorCode); 3817 3818 /** 3819 * Return the Unicode name for a given property, as given in the 3820 * Unicode database file PropertyAliases.txt. 3821 * 3822 * In addition, this function maps the property 3823 * UCHAR_GENERAL_CATEGORY_MASK to the synthetic names "gcm" / 3824 * "General_Category_Mask". These names are not in 3825 * PropertyAliases.txt. 3826 * 3827 * @param property UProperty selector other than UCHAR_INVALID_CODE. 3828 * If out of range, NULL is returned. 3829 * 3830 * @param nameChoice selector for which name to get. If out of range, 3831 * NULL is returned. All properties have a long name. Most 3832 * have a short name, but some do not. Unicode allows for 3833 * additional names; if present these will be returned by 3834 * U_LONG_PROPERTY_NAME + i, where i=1, 2,... 3835 * 3836 * @return a pointer to the name, or NULL if either the 3837 * property or the nameChoice is out of range. If a given 3838 * nameChoice returns NULL, then all larger values of 3839 * nameChoice will return NULL, with one exception: if NULL is 3840 * returned for U_SHORT_PROPERTY_NAME, then 3841 * U_LONG_PROPERTY_NAME (and higher) may still return a 3842 * non-NULL value. The returned pointer is valid until 3843 * u_cleanup() is called. 3844 * 3845 * @see UProperty 3846 * @see UPropertyNameChoice 3847 * @stable ICU 2.4 3848 */ 3849 U_CAPI const char* U_EXPORT2 3850 u_getPropertyName(UProperty property, 3851 UPropertyNameChoice nameChoice); 3852 3853 /** 3854 * Return the UProperty enum for a given property name, as specified 3855 * in the Unicode database file PropertyAliases.txt. Short, long, and 3856 * any other variants are recognized. 3857 * 3858 * In addition, this function maps the synthetic names "gcm" / 3859 * "General_Category_Mask" to the property 3860 * UCHAR_GENERAL_CATEGORY_MASK. These names are not in 3861 * PropertyAliases.txt. 3862 * 3863 * @param alias the property name to be matched. The name is compared 3864 * using "loose matching" as described in PropertyAliases.txt. 3865 * 3866 * @return a UProperty enum, or UCHAR_INVALID_CODE if the given name 3867 * does not match any property. 3868 * 3869 * @see UProperty 3870 * @stable ICU 2.4 3871 */ 3872 U_CAPI UProperty U_EXPORT2 3873 u_getPropertyEnum(const char* alias); 3874 3875 /** 3876 * Return the Unicode name for a given property value, as given in the 3877 * Unicode database file PropertyValueAliases.txt. 3878 * 3879 * Note: Some of the names in PropertyValueAliases.txt can only be 3880 * retrieved using UCHAR_GENERAL_CATEGORY_MASK, not 3881 * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" / 3882 * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P" 3883 * / "Punctuation", "S" / "Symbol", and "Z" / "Separator". 3884 * 3885 * @param property UProperty selector constant. 3886 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT 3887 * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT 3888 * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. 3889 * If out of range, NULL is returned. 3890 * 3891 * @param value selector for a value for the given property. If out 3892 * of range, NULL is returned. In general, valid values range 3893 * from 0 up to some maximum. There are a few exceptions: 3894 * (1.) UCHAR_BLOCK values begin at the non-zero value 3895 * UBLOCK_BASIC_LATIN. (2.) UCHAR_CANONICAL_COMBINING_CLASS 3896 * values are not contiguous and range from 0..240. (3.) 3897 * UCHAR_GENERAL_CATEGORY_MASK values are not values of 3898 * UCharCategory, but rather mask values produced by 3899 * U_GET_GC_MASK(). This allows grouped categories such as 3900 * [:L:] to be represented. Mask values range 3901 * non-contiguously from 1..U_GC_P_MASK. 3902 * 3903 * @param nameChoice selector for which name to get. If out of range, 3904 * NULL is returned. All values have a long name. Most have 3905 * a short name, but some do not. Unicode allows for 3906 * additional names; if present these will be returned by 3907 * U_LONG_PROPERTY_NAME + i, where i=1, 2,... 3908 3909 * @return a pointer to the name, or NULL if either the 3910 * property or the nameChoice is out of range. If a given 3911 * nameChoice returns NULL, then all larger values of 3912 * nameChoice will return NULL, with one exception: if NULL is 3913 * returned for U_SHORT_PROPERTY_NAME, then 3914 * U_LONG_PROPERTY_NAME (and higher) may still return a 3915 * non-NULL value. The returned pointer is valid until 3916 * u_cleanup() is called. 3917 * 3918 * @see UProperty 3919 * @see UPropertyNameChoice 3920 * @stable ICU 2.4 3921 */ 3922 U_CAPI const char* U_EXPORT2 3923 u_getPropertyValueName(UProperty property, 3924 int32_t value, 3925 UPropertyNameChoice nameChoice); 3926 3927 /** 3928 * Return the property value integer for a given value name, as 3929 * specified in the Unicode database file PropertyValueAliases.txt. 3930 * Short, long, and any other variants are recognized. 3931 * 3932 * Note: Some of the names in PropertyValueAliases.txt will only be 3933 * recognized with UCHAR_GENERAL_CATEGORY_MASK, not 3934 * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" / 3935 * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P" 3936 * / "Punctuation", "S" / "Symbol", and "Z" / "Separator". 3937 * 3938 * @param property UProperty selector constant. 3939 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT 3940 * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT 3941 * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. 3942 * If out of range, UCHAR_INVALID_CODE is returned. 3943 * 3944 * @param alias the value name to be matched. The name is compared 3945 * using "loose matching" as described in 3946 * PropertyValueAliases.txt. 3947 * 3948 * @return a value integer or UCHAR_INVALID_CODE if the given name 3949 * does not match any value of the given property, or if the 3950 * property is invalid. Note: UCHAR_GENERAL_CATEGORY_MASK values 3951 * are not values of UCharCategory, but rather mask values 3952 * produced by U_GET_GC_MASK(). This allows grouped 3953 * categories such as [:L:] to be represented. 3954 * 3955 * @see UProperty 3956 * @stable ICU 2.4 3957 */ 3958 U_CAPI int32_t U_EXPORT2 3959 u_getPropertyValueEnum(UProperty property, 3960 const char* alias); 3961 3962 /** 3963 * Determines if the specified character is permissible as the first character in an identifier 3964 * according to UAX #31 Unicode Identifier and Pattern Syntax. 3965 * 3966 * Same as Unicode ID_Start (UCHAR_ID_START). 3967 * 3968 * @param c the code point to be tested 3969 * @return true if the code point may start an identifier 3970 * 3971 * @see UCHAR_ID_START 3972 * @see u_isalpha 3973 * @see u_isIDPart 3974 * @stable ICU 2.0 3975 */ 3976 U_CAPI UBool U_EXPORT2 3977 u_isIDStart(UChar32 c); 3978 3979 /** 3980 * Determines if the specified character is permissible as a non-initial character of an identifier 3981 * according to UAX #31 Unicode Identifier and Pattern Syntax. 3982 * 3983 * Same as Unicode ID_Continue (UCHAR_ID_CONTINUE). 3984 * 3985 * @param c the code point to be tested 3986 * @return true if the code point may occur as a non-initial character of an identifier 3987 * 3988 * @see UCHAR_ID_CONTINUE 3989 * @see u_isIDStart 3990 * @see u_isIDIgnorable 3991 * @stable ICU 2.0 3992 */ 3993 U_CAPI UBool U_EXPORT2 3994 u_isIDPart(UChar32 c); 3995 3996 #ifndef U_HIDE_DRAFT_API 3997 /** 3998 * Does the set of Identifier_Type values code point c contain the given type? 3999 * 4000 * Used for UTS #39 General Security Profile for Identifiers 4001 * (https://www.unicode.org/reports/tr39/#General_Security_Profile). 4002 * 4003 * Each code point maps to a <i>set</i> of UIdentifierType values. 4004 * 4005 * @param c code point 4006 * @param type Identifier_Type to check 4007 * @return true if type is in Identifier_Type(c) 4008 * @draft ICU 75 4009 */ 4010 U_CAPI bool U_EXPORT2 4011 u_hasIDType(UChar32 c, UIdentifierType type); 4012 4013 /** 4014 * Writes code point c's Identifier_Type as a list of UIdentifierType values 4015 * to the output types array and returns the number of types. 4016 * 4017 * Used for UTS #39 General Security Profile for Identifiers 4018 * (https://www.unicode.org/reports/tr39/#General_Security_Profile). 4019 * 4020 * Each code point maps to a <i>set</i> of UIdentifierType values. 4021 * There is always at least one type. 4022 * The order of output values is undefined. 4023 * Each type is output at most once; 4024 * there cannot be more output values than UIdentifierType constants. 4025 * In addition, only some of the types can be combined with others, 4026 * and usually only a small number of types occur together. 4027 * Future versions might add additional types. 4028 * See UTS #39 and its data files for details. 4029 * 4030 * If there are more than capacity types to be written, then 4031 * U_BUFFER_OVERFLOW_ERROR is set and the number of types is returned. 4032 * (Usual ICU buffer handling behavior.) 4033 * 4034 * @param c code point 4035 * @param types output array 4036 * @param capacity capacity of the array 4037 * @param pErrorCode Standard ICU error code. Its input value must 4038 * pass the U_SUCCESS() test, or else the function returns 4039 * immediately. Check for U_FAILURE() on output or use with 4040 * function chaining. (See User Guide for details.) 4041 * @return number of values in c's Identifier_Type, 4042 * written to types unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity 4043 * @draft ICU 75 4044 */ 4045 U_CAPI int32_t U_EXPORT2 4046 u_getIDTypes(UChar32 c, UIdentifierType *types, int32_t capacity, UErrorCode *pErrorCode); 4047 #endif // U_HIDE_DRAFT_API 4048 4049 /** 4050 * Determines if the specified character should be regarded 4051 * as an ignorable character in an identifier, 4052 * according to Java. 4053 * True for characters with general category "Cf" (format controls) as well as 4054 * non-whitespace ISO controls 4055 * (U+0000..U+0008, U+000E..U+001B, U+007F..U+009F). 4056 * 4057 * Same as java.lang.Character.isIdentifierIgnorable(). 4058 * 4059 * Note that Unicode just recommends to ignore Cf (format controls). 4060 * 4061 * @param c the code point to be tested 4062 * @return true if the code point is ignorable in identifiers according to Java 4063 * 4064 * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT 4065 * @see u_isIDStart 4066 * @see u_isIDPart 4067 * @stable ICU 2.0 4068 */ 4069 U_CAPI UBool U_EXPORT2 4070 u_isIDIgnorable(UChar32 c); 4071 4072 /** 4073 * Determines if the specified character is permissible as the 4074 * first character in a Java identifier. 4075 * In addition to u_isIDStart(c), true for characters with 4076 * general categories "Sc" (currency symbols) and "Pc" (connecting punctuation). 4077 * 4078 * Same as java.lang.Character.isJavaIdentifierStart(). 4079 * 4080 * @param c the code point to be tested 4081 * @return true if the code point may start a Java identifier 4082 * 4083 * @see u_isJavaIDPart 4084 * @see u_isalpha 4085 * @see u_isIDStart 4086 * @stable ICU 2.0 4087 */ 4088 U_CAPI UBool U_EXPORT2 4089 u_isJavaIDStart(UChar32 c); 4090 4091 /** 4092 * Determines if the specified character is permissible 4093 * in a Java identifier. 4094 * In addition to u_isIDPart(c), true for characters with 4095 * general category "Sc" (currency symbols). 4096 * 4097 * Same as java.lang.Character.isJavaIdentifierPart(). 4098 * 4099 * @param c the code point to be tested 4100 * @return true if the code point may occur in a Java identifier 4101 * 4102 * @see u_isIDIgnorable 4103 * @see u_isJavaIDStart 4104 * @see u_isalpha 4105 * @see u_isdigit 4106 * @see u_isIDPart 4107 * @stable ICU 2.0 4108 */ 4109 U_CAPI UBool U_EXPORT2 4110 u_isJavaIDPart(UChar32 c); 4111 4112 /** 4113 * The given character is mapped to its lowercase equivalent according to 4114 * UnicodeData.txt; if the character has no lowercase equivalent, the character 4115 * itself is returned. 4116 * 4117 * Same as java.lang.Character.toLowerCase(). 4118 * 4119 * This function only returns the simple, single-code point case mapping. 4120 * Full case mappings should be used whenever possible because they produce 4121 * better results by working on whole strings. 4122 * They take into account the string context and the language and can map 4123 * to a result string with a different length as appropriate. 4124 * Full case mappings are applied by the string case mapping functions, 4125 * see ustring.h and the UnicodeString class. 4126 * See also the User Guide chapter on C/POSIX migration: 4127 * https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings 4128 * 4129 * @param c the code point to be mapped 4130 * @return the Simple_Lowercase_Mapping of the code point, if any; 4131 * otherwise the code point itself. 4132 * @stable ICU 2.0 4133 */ 4134 U_CAPI UChar32 U_EXPORT2 4135 u_tolower(UChar32 c); 4136 4137 /** 4138 * The given character is mapped to its uppercase equivalent according to UnicodeData.txt; 4139 * if the character has no uppercase equivalent, the character itself is 4140 * returned. 4141 * 4142 * Same as java.lang.Character.toUpperCase(). 4143 * 4144 * This function only returns the simple, single-code point case mapping. 4145 * Full case mappings should be used whenever possible because they produce 4146 * better results by working on whole strings. 4147 * They take into account the string context and the language and can map 4148 * to a result string with a different length as appropriate. 4149 * Full case mappings are applied by the string case mapping functions, 4150 * see ustring.h and the UnicodeString class. 4151 * See also the User Guide chapter on C/POSIX migration: 4152 * https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings 4153 * 4154 * @param c the code point to be mapped 4155 * @return the Simple_Uppercase_Mapping of the code point, if any; 4156 * otherwise the code point itself. 4157 * @stable ICU 2.0 4158 */ 4159 U_CAPI UChar32 U_EXPORT2 4160 u_toupper(UChar32 c); 4161 4162 /** 4163 * The given character is mapped to its titlecase equivalent 4164 * according to UnicodeData.txt; 4165 * if none is defined, the character itself is returned. 4166 * 4167 * Same as java.lang.Character.toTitleCase(). 4168 * 4169 * This function only returns the simple, single-code point case mapping. 4170 * Full case mappings should be used whenever possible because they produce 4171 * better results by working on whole strings. 4172 * They take into account the string context and the language and can map 4173 * to a result string with a different length as appropriate. 4174 * Full case mappings are applied by the string case mapping functions, 4175 * see ustring.h and the UnicodeString class. 4176 * See also the User Guide chapter on C/POSIX migration: 4177 * https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings 4178 * 4179 * @param c the code point to be mapped 4180 * @return the Simple_Titlecase_Mapping of the code point, if any; 4181 * otherwise the code point itself. 4182 * @stable ICU 2.0 4183 */ 4184 U_CAPI UChar32 U_EXPORT2 4185 u_totitle(UChar32 c); 4186 4187 /** 4188 * The given character is mapped to its case folding equivalent according to 4189 * UnicodeData.txt and CaseFolding.txt; 4190 * if the character has no case folding equivalent, the character 4191 * itself is returned. 4192 * 4193 * This function only returns the simple, single-code point case mapping. 4194 * Full case mappings should be used whenever possible because they produce 4195 * better results by working on whole strings. 4196 * They take into account the string context and the language and can map 4197 * to a result string with a different length as appropriate. 4198 * Full case mappings are applied by the string case mapping functions, 4199 * see ustring.h and the UnicodeString class. 4200 * See also the User Guide chapter on C/POSIX migration: 4201 * https://unicode-org.github.io/icu/userguide/icu/posix#case-mappings 4202 * 4203 * @param c the code point to be mapped 4204 * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I 4205 * @return the Simple_Case_Folding of the code point, if any; 4206 * otherwise the code point itself. 4207 * @stable ICU 2.0 4208 */ 4209 U_CAPI UChar32 U_EXPORT2 4210 u_foldCase(UChar32 c, uint32_t options); 4211 4212 /** 4213 * Returns the decimal digit value of the code point in the 4214 * specified radix. 4215 * 4216 * If the radix is not in the range <code>2<=radix<=36</code> or if the 4217 * value of <code>c</code> is not a valid digit in the specified 4218 * radix, <code>-1</code> is returned. A character is a valid digit 4219 * if at least one of the following is true: 4220 * <ul> 4221 * <li>The character has a decimal digit value. 4222 * Such characters have the general category "Nd" (decimal digit numbers) 4223 * and a Numeric_Type of Decimal. 4224 * In this case the value is the character's decimal digit value.</li> 4225 * <li>The character is one of the uppercase Latin letters 4226 * <code>'A'</code> through <code>'Z'</code>. 4227 * In this case the value is <code>c-'A'+10</code>.</li> 4228 * <li>The character is one of the lowercase Latin letters 4229 * <code>'a'</code> through <code>'z'</code>. 4230 * In this case the value is <code>ch-'a'+10</code>.</li> 4231 * <li>Latin letters from both the ASCII range (0061..007A, 0041..005A) 4232 * as well as from the Fullwidth ASCII range (FF41..FF5A, FF21..FF3A) 4233 * are recognized.</li> 4234 * </ul> 4235 * 4236 * Same as java.lang.Character.digit(). 4237 * 4238 * @param ch the code point to be tested. 4239 * @param radix the radix. 4240 * @return the numeric value represented by the character in the 4241 * specified radix, 4242 * or -1 if there is no value or if the value exceeds the radix. 4243 * 4244 * @see UCHAR_NUMERIC_TYPE 4245 * @see u_forDigit 4246 * @see u_charDigitValue 4247 * @see u_isdigit 4248 * @stable ICU 2.0 4249 */ 4250 U_CAPI int32_t U_EXPORT2 4251 u_digit(UChar32 ch, int8_t radix); 4252 4253 /** 4254 * Determines the character representation for a specific digit in 4255 * the specified radix. If the value of <code>radix</code> is not a 4256 * valid radix, or the value of <code>digit</code> is not a valid 4257 * digit in the specified radix, the null character 4258 * (<code>U+0000</code>) is returned. 4259 * <p> 4260 * The <code>radix</code> argument is valid if it is greater than or 4261 * equal to 2 and less than or equal to 36. 4262 * The <code>digit</code> argument is valid if 4263 * <code>0 <= digit < radix</code>. 4264 * <p> 4265 * If the digit is less than 10, then 4266 * <code>'0' + digit</code> is returned. Otherwise, the value 4267 * <code>'a' + digit - 10</code> is returned. 4268 * 4269 * Same as java.lang.Character.forDigit(). 4270 * 4271 * @param digit the number to convert to a character. 4272 * @param radix the radix. 4273 * @return the <code>char</code> representation of the specified digit 4274 * in the specified radix. 4275 * 4276 * @see u_digit 4277 * @see u_charDigitValue 4278 * @see u_isdigit 4279 * @stable ICU 2.0 4280 */ 4281 U_CAPI UChar32 U_EXPORT2 4282 u_forDigit(int32_t digit, int8_t radix); 4283 4284 /** 4285 * Get the "age" of the code point. 4286 * The "age" is the Unicode version when the code point was first 4287 * designated (as a non-character or for Private Use) 4288 * or assigned a character. 4289 * This can be useful to avoid emitting code points to receiving 4290 * processes that do not accept newer characters. 4291 * The data is from the UCD file DerivedAge.txt. 4292 * 4293 * @param c The code point. 4294 * @param versionArray The Unicode version number array, to be filled in. 4295 * 4296 * @stable ICU 2.1 4297 */ 4298 U_CAPI void U_EXPORT2 4299 u_charAge(UChar32 c, UVersionInfo versionArray); 4300 4301 /** 4302 * Gets the Unicode version information. 4303 * The version array is filled in with the version information 4304 * for the Unicode standard that is currently used by ICU. 4305 * For example, Unicode version 3.1.1 is represented as an array with 4306 * the values { 3, 1, 1, 0 }. 4307 * 4308 * @param versionArray an output array that will be filled in with 4309 * the Unicode version number 4310 * @stable ICU 2.0 4311 */ 4312 U_CAPI void U_EXPORT2 4313 u_getUnicodeVersion(UVersionInfo versionArray); 4314 4315 #if !UCONFIG_NO_NORMALIZATION 4316 /** 4317 * Get the FC_NFKC_Closure property string for a character. 4318 * See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure" 4319 * or for "FNC": http://www.unicode.org/reports/tr15/ 4320 * 4321 * @param c The character (code point) for which to get the FC_NFKC_Closure string. 4322 * It must be <code>0<=c<=0x10ffff</code>. 4323 * @param dest Destination address for copying the string. 4324 * The string will be zero-terminated if possible. 4325 * If there is no FC_NFKC_Closure string, 4326 * then the buffer will be set to the empty string. 4327 * @param destCapacity <code>==sizeof(dest)</code> 4328 * @param pErrorCode Pointer to a UErrorCode variable. 4329 * @return The length of the string, or 0 if there is no FC_NFKC_Closure string for this character. 4330 * If the destCapacity is less than or equal to the length, then the buffer 4331 * contains the truncated name and the returned length indicates the full 4332 * length of the name. 4333 * The length does not include the zero-termination. 4334 * 4335 * @stable ICU 2.2 4336 */ 4337 U_CAPI int32_t U_EXPORT2 4338 u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode); 4339 4340 #endif 4341 4342 4343 U_CDECL_END 4344 4345 #endif /*_UCHAR*/ 4346 /*eof*/ 4347