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