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 "13.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 // New blocks in Unicode 12.0
1771
1772 /** @stable ICU 64 */
1773 UBLOCK_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS = 292, /*[13430]*/
1774 /** @stable ICU 64 */
1775 UBLOCK_ELYMAIC = 293, /*[10FE0]*/
1776 /** @stable ICU 64 */
1777 UBLOCK_NANDINAGARI = 294, /*[119A0]*/
1778 /** @stable ICU 64 */
1779 UBLOCK_NYIAKENG_PUACHUE_HMONG = 295, /*[1E100]*/
1780 /** @stable ICU 64 */
1781 UBLOCK_OTTOMAN_SIYAQ_NUMBERS = 296, /*[1ED00]*/
1782 /** @stable ICU 64 */
1783 UBLOCK_SMALL_KANA_EXTENSION = 297, /*[1B130]*/
1784 /** @stable ICU 64 */
1785 UBLOCK_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A = 298, /*[1FA70]*/
1786 /** @stable ICU 64 */
1787 UBLOCK_TAMIL_SUPPLEMENT = 299, /*[11FC0]*/
1788 /** @stable ICU 64 */
1789 UBLOCK_WANCHO = 300, /*[1E2C0]*/
1790
1791 // New blocks in Unicode 13.0
1792
1793 /** @stable ICU 66 */
1794 UBLOCK_CHORASMIAN = 301, /*[10FB0]*/
1795 /** @stable ICU 66 */
1796 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G = 302, /*[30000]*/
1797 /** @stable ICU 66 */
1798 UBLOCK_DIVES_AKURU = 303, /*[11900]*/
1799 /** @stable ICU 66 */
1800 UBLOCK_KHITAN_SMALL_SCRIPT = 304, /*[18B00]*/
1801 /** @stable ICU 66 */
1802 UBLOCK_LISU_SUPPLEMENT = 305, /*[11FB0]*/
1803 /** @stable ICU 66 */
1804 UBLOCK_SYMBOLS_FOR_LEGACY_COMPUTING = 306, /*[1FB00]*/
1805 /** @stable ICU 66 */
1806 UBLOCK_TANGUT_SUPPLEMENT = 307, /*[18D00]*/
1807 /** @stable ICU 66 */
1808 UBLOCK_YEZIDI = 308, /*[10E80]*/
1809
1810#ifndef U_HIDE_DEPRECATED_API
1811 /**
1812 * One more than the highest normal UBlockCode value.
1813 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_BLOCK).
1814 *
1815 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1816 */
1817 UBLOCK_COUNT = 309,
1818#endif // U_HIDE_DEPRECATED_API
1819
1820 /** @stable ICU 2.0 */
1821 UBLOCK_INVALID_CODE=-1
1822};
1823
1824/** @stable ICU 2.0 */
1825typedef enum UBlockCode UBlockCode;
1826
1827/**
1828 * East Asian Width constants.
1829 *
1830 * @see UCHAR_EAST_ASIAN_WIDTH
1831 * @see u_getIntPropertyValue
1832 * @stable ICU 2.2
1833 */
1834typedef enum UEastAsianWidth {
1835 /*
1836 * Note: UEastAsianWidth constants are parsed by preparseucd.py.
1837 * It matches lines like
1838 * U_EA_<Unicode East_Asian_Width value name>
1839 */
1840
1841 U_EA_NEUTRAL, /*[N]*/
1842 U_EA_AMBIGUOUS, /*[A]*/
1843 U_EA_HALFWIDTH, /*[H]*/
1844 U_EA_FULLWIDTH, /*[F]*/
1845 U_EA_NARROW, /*[Na]*/
1846 U_EA_WIDE, /*[W]*/
1847#ifndef U_HIDE_DEPRECATED_API
1848 /**
1849 * One more than the highest normal UEastAsianWidth value.
1850 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH).
1851 *
1852 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1853 */
1854 U_EA_COUNT
1855#endif // U_HIDE_DEPRECATED_API
1856} UEastAsianWidth;
1857
1858/**
1859 * Selector constants for u_charName().
1860 * u_charName() returns the "modern" name of a
1861 * Unicode character; or the name that was defined in
1862 * Unicode version 1.0, before the Unicode standard merged
1863 * with ISO-10646; or an "extended" name that gives each
1864 * Unicode code point a unique name.
1865 *
1866 * @see u_charName
1867 * @stable ICU 2.0
1868 */
1869typedef enum UCharNameChoice {
1870 /** Unicode character name (Name property). @stable ICU 2.0 */
1871 U_UNICODE_CHAR_NAME,
1872#ifndef U_HIDE_DEPRECATED_API
1873 /**
1874 * The Unicode_1_Name property value which is of little practical value.
1875 * Beginning with ICU 49, ICU APIs return an empty string for this name choice.
1876 * @deprecated ICU 49
1877 */
1878 U_UNICODE_10_CHAR_NAME,
1879#endif /* U_HIDE_DEPRECATED_API */
1880 /** Standard or synthetic character name. @stable ICU 2.0 */
1881 U_EXTENDED_CHAR_NAME = U_UNICODE_CHAR_NAME+2,
1882 /** Corrected name from NameAliases.txt. @stable ICU 4.4 */
1883 U_CHAR_NAME_ALIAS,
1884#ifndef U_HIDE_DEPRECATED_API
1885 /**
1886 * One more than the highest normal UCharNameChoice value.
1887 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1888 */
1889 U_CHAR_NAME_CHOICE_COUNT
1890#endif // U_HIDE_DEPRECATED_API
1891} UCharNameChoice;
1892
1893/**
1894 * Selector constants for u_getPropertyName() and
1895 * u_getPropertyValueName(). These selectors are used to choose which
1896 * name is returned for a given property or value. All properties and
1897 * values have a long name. Most have a short name, but some do not.
1898 * Unicode allows for additional names, beyond the long and short
1899 * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where
1900 * i=1, 2,...
1901 *
1902 * @see u_getPropertyName()
1903 * @see u_getPropertyValueName()
1904 * @stable ICU 2.4
1905 */
1906typedef enum UPropertyNameChoice {
1907 U_SHORT_PROPERTY_NAME,
1908 U_LONG_PROPERTY_NAME,
1909#ifndef U_HIDE_DEPRECATED_API
1910 /**
1911 * One more than the highest normal UPropertyNameChoice value.
1912 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1913 */
1914 U_PROPERTY_NAME_CHOICE_COUNT
1915#endif // U_HIDE_DEPRECATED_API
1916} UPropertyNameChoice;
1917
1918/**
1919 * Decomposition Type constants.
1920 *
1921 * @see UCHAR_DECOMPOSITION_TYPE
1922 * @stable ICU 2.2
1923 */
1924typedef enum UDecompositionType {
1925 /*
1926 * Note: UDecompositionType constants are parsed by preparseucd.py.
1927 * It matches lines like
1928 * U_DT_<Unicode Decomposition_Type value name>
1929 */
1930
1931 U_DT_NONE, /*[none]*/
1932 U_DT_CANONICAL, /*[can]*/
1933 U_DT_COMPAT, /*[com]*/
1934 U_DT_CIRCLE, /*[enc]*/
1935 U_DT_FINAL, /*[fin]*/
1936 U_DT_FONT, /*[font]*/
1937 U_DT_FRACTION, /*[fra]*/
1938 U_DT_INITIAL, /*[init]*/
1939 U_DT_ISOLATED, /*[iso]*/
1940 U_DT_MEDIAL, /*[med]*/
1941 U_DT_NARROW, /*[nar]*/
1942 U_DT_NOBREAK, /*[nb]*/
1943 U_DT_SMALL, /*[sml]*/
1944 U_DT_SQUARE, /*[sqr]*/
1945 U_DT_SUB, /*[sub]*/
1946 U_DT_SUPER, /*[sup]*/
1947 U_DT_VERTICAL, /*[vert]*/
1948 U_DT_WIDE, /*[wide]*/
1949#ifndef U_HIDE_DEPRECATED_API
1950 /**
1951 * One more than the highest normal UDecompositionType value.
1952 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_DECOMPOSITION_TYPE).
1953 *
1954 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1955 */
1956 U_DT_COUNT /* 18 */
1957#endif // U_HIDE_DEPRECATED_API
1958} UDecompositionType;
1959
1960/**
1961 * Joining Type constants.
1962 *
1963 * @see UCHAR_JOINING_TYPE
1964 * @stable ICU 2.2
1965 */
1966typedef enum UJoiningType {
1967 /*
1968 * Note: UJoiningType constants are parsed by preparseucd.py.
1969 * It matches lines like
1970 * U_JT_<Unicode Joining_Type value name>
1971 */
1972
1973 U_JT_NON_JOINING, /*[U]*/
1974 U_JT_JOIN_CAUSING, /*[C]*/
1975 U_JT_DUAL_JOINING, /*[D]*/
1976 U_JT_LEFT_JOINING, /*[L]*/
1977 U_JT_RIGHT_JOINING, /*[R]*/
1978 U_JT_TRANSPARENT, /*[T]*/
1979#ifndef U_HIDE_DEPRECATED_API
1980 /**
1981 * One more than the highest normal UJoiningType value.
1982 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_JOINING_TYPE).
1983 *
1984 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
1985 */
1986 U_JT_COUNT /* 6 */
1987#endif // U_HIDE_DEPRECATED_API
1988} UJoiningType;
1989
1990/**
1991 * Joining Group constants.
1992 *
1993 * @see UCHAR_JOINING_GROUP
1994 * @stable ICU 2.2
1995 */
1996typedef enum UJoiningGroup {
1997 /*
1998 * Note: UJoiningGroup constants are parsed by preparseucd.py.
1999 * It matches lines like
2000 * U_JG_<Unicode Joining_Group value name>
2001 */
2002
2003 U_JG_NO_JOINING_GROUP,
2004 U_JG_AIN,
2005 U_JG_ALAPH,
2006 U_JG_ALEF,
2007 U_JG_BEH,
2008 U_JG_BETH,
2009 U_JG_DAL,
2010 U_JG_DALATH_RISH,
2011 U_JG_E,
2012 U_JG_FEH,
2013 U_JG_FINAL_SEMKATH,
2014 U_JG_GAF,
2015 U_JG_GAMAL,
2016 U_JG_HAH,
2017 U_JG_TEH_MARBUTA_GOAL, /**< @stable ICU 4.6 */
2018 U_JG_HAMZA_ON_HEH_GOAL=U_JG_TEH_MARBUTA_GOAL,
2019 U_JG_HE,
2020 U_JG_HEH,
2021 U_JG_HEH_GOAL,
2022 U_JG_HETH,
2023 U_JG_KAF,
2024 U_JG_KAPH,
2025 U_JG_KNOTTED_HEH,
2026 U_JG_LAM,
2027 U_JG_LAMADH,
2028 U_JG_MEEM,
2029 U_JG_MIM,
2030 U_JG_NOON,
2031 U_JG_NUN,
2032 U_JG_PE,
2033 U_JG_QAF,
2034 U_JG_QAPH,
2035 U_JG_REH,
2036 U_JG_REVERSED_PE,
2037 U_JG_SAD,
2038 U_JG_SADHE,
2039 U_JG_SEEN,
2040 U_JG_SEMKATH,
2041 U_JG_SHIN,
2042 U_JG_SWASH_KAF,
2043 U_JG_SYRIAC_WAW,
2044 U_JG_TAH,
2045 U_JG_TAW,
2046 U_JG_TEH_MARBUTA,
2047 U_JG_TETH,
2048 U_JG_WAW,
2049 U_JG_YEH,
2050 U_JG_YEH_BARREE,
2051 U_JG_YEH_WITH_TAIL,
2052 U_JG_YUDH,
2053 U_JG_YUDH_HE,
2054 U_JG_ZAIN,
2055 U_JG_FE, /**< @stable ICU 2.6 */
2056 U_JG_KHAPH, /**< @stable ICU 2.6 */
2057 U_JG_ZHAIN, /**< @stable ICU 2.6 */
2058 U_JG_BURUSHASKI_YEH_BARREE, /**< @stable ICU 4.0 */
2059 U_JG_FARSI_YEH, /**< @stable ICU 4.4 */
2060 U_JG_NYA, /**< @stable ICU 4.4 */
2061 U_JG_ROHINGYA_YEH, /**< @stable ICU 49 */
2062 U_JG_MANICHAEAN_ALEPH, /**< @stable ICU 54 */
2063 U_JG_MANICHAEAN_AYIN, /**< @stable ICU 54 */
2064 U_JG_MANICHAEAN_BETH, /**< @stable ICU 54 */
2065 U_JG_MANICHAEAN_DALETH, /**< @stable ICU 54 */
2066 U_JG_MANICHAEAN_DHAMEDH, /**< @stable ICU 54 */
2067 U_JG_MANICHAEAN_FIVE, /**< @stable ICU 54 */
2068 U_JG_MANICHAEAN_GIMEL, /**< @stable ICU 54 */
2069 U_JG_MANICHAEAN_HETH, /**< @stable ICU 54 */
2070 U_JG_MANICHAEAN_HUNDRED, /**< @stable ICU 54 */
2071 U_JG_MANICHAEAN_KAPH, /**< @stable ICU 54 */
2072 U_JG_MANICHAEAN_LAMEDH, /**< @stable ICU 54 */
2073 U_JG_MANICHAEAN_MEM, /**< @stable ICU 54 */
2074 U_JG_MANICHAEAN_NUN, /**< @stable ICU 54 */
2075 U_JG_MANICHAEAN_ONE, /**< @stable ICU 54 */
2076 U_JG_MANICHAEAN_PE, /**< @stable ICU 54 */
2077 U_JG_MANICHAEAN_QOPH, /**< @stable ICU 54 */
2078 U_JG_MANICHAEAN_RESH, /**< @stable ICU 54 */
2079 U_JG_MANICHAEAN_SADHE, /**< @stable ICU 54 */
2080 U_JG_MANICHAEAN_SAMEKH, /**< @stable ICU 54 */
2081 U_JG_MANICHAEAN_TAW, /**< @stable ICU 54 */
2082 U_JG_MANICHAEAN_TEN, /**< @stable ICU 54 */
2083 U_JG_MANICHAEAN_TETH, /**< @stable ICU 54 */
2084 U_JG_MANICHAEAN_THAMEDH, /**< @stable ICU 54 */
2085 U_JG_MANICHAEAN_TWENTY, /**< @stable ICU 54 */
2086 U_JG_MANICHAEAN_WAW, /**< @stable ICU 54 */
2087 U_JG_MANICHAEAN_YODH, /**< @stable ICU 54 */
2088 U_JG_MANICHAEAN_ZAYIN, /**< @stable ICU 54 */
2089 U_JG_STRAIGHT_WAW, /**< @stable ICU 54 */
2090 U_JG_AFRICAN_FEH, /**< @stable ICU 58 */
2091 U_JG_AFRICAN_NOON, /**< @stable ICU 58 */
2092 U_JG_AFRICAN_QAF, /**< @stable ICU 58 */
2093
2094 U_JG_MALAYALAM_BHA, /**< @stable ICU 60 */
2095 U_JG_MALAYALAM_JA, /**< @stable ICU 60 */
2096 U_JG_MALAYALAM_LLA, /**< @stable ICU 60 */
2097 U_JG_MALAYALAM_LLLA, /**< @stable ICU 60 */
2098 U_JG_MALAYALAM_NGA, /**< @stable ICU 60 */
2099 U_JG_MALAYALAM_NNA, /**< @stable ICU 60 */
2100 U_JG_MALAYALAM_NNNA, /**< @stable ICU 60 */
2101 U_JG_MALAYALAM_NYA, /**< @stable ICU 60 */
2102 U_JG_MALAYALAM_RA, /**< @stable ICU 60 */
2103 U_JG_MALAYALAM_SSA, /**< @stable ICU 60 */
2104 U_JG_MALAYALAM_TTA, /**< @stable ICU 60 */
2105
2106 U_JG_HANIFI_ROHINGYA_KINNA_YA, /**< @stable ICU 62 */
2107 U_JG_HANIFI_ROHINGYA_PA, /**< @stable ICU 62 */
2108
2109#ifndef U_HIDE_DEPRECATED_API
2110 /**
2111 * One more than the highest normal UJoiningGroup value.
2112 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_JOINING_GROUP).
2113 *
2114 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2115 */
2116 U_JG_COUNT
2117#endif // U_HIDE_DEPRECATED_API
2118} UJoiningGroup;
2119
2120/**
2121 * Grapheme Cluster Break constants.
2122 *
2123 * @see UCHAR_GRAPHEME_CLUSTER_BREAK
2124 * @stable ICU 3.4
2125 */
2126typedef enum UGraphemeClusterBreak {
2127 /*
2128 * Note: UGraphemeClusterBreak constants are parsed by preparseucd.py.
2129 * It matches lines like
2130 * U_GCB_<Unicode Grapheme_Cluster_Break value name>
2131 */
2132
2133 U_GCB_OTHER = 0, /*[XX]*/
2134 U_GCB_CONTROL = 1, /*[CN]*/
2135 U_GCB_CR = 2, /*[CR]*/
2136 U_GCB_EXTEND = 3, /*[EX]*/
2137 U_GCB_L = 4, /*[L]*/
2138 U_GCB_LF = 5, /*[LF]*/
2139 U_GCB_LV = 6, /*[LV]*/
2140 U_GCB_LVT = 7, /*[LVT]*/
2141 U_GCB_T = 8, /*[T]*/
2142 U_GCB_V = 9, /*[V]*/
2143 /** @stable ICU 4.0 */
2144 U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */
2145 /** @stable ICU 4.0 */
2146 U_GCB_PREPEND = 11, /*[PP]*/
2147 /** @stable ICU 50 */
2148 U_GCB_REGIONAL_INDICATOR = 12, /*[RI]*/ /* new in Unicode 6.2/ICU 50 */
2149 /** @stable ICU 58 */
2150 U_GCB_E_BASE = 13, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */
2151 /** @stable ICU 58 */
2152 U_GCB_E_BASE_GAZ = 14, /*[EBG]*/
2153 /** @stable ICU 58 */
2154 U_GCB_E_MODIFIER = 15, /*[EM]*/
2155 /** @stable ICU 58 */
2156 U_GCB_GLUE_AFTER_ZWJ = 16, /*[GAZ]*/
2157 /** @stable ICU 58 */
2158 U_GCB_ZWJ = 17, /*[ZWJ]*/
2159
2160#ifndef U_HIDE_DEPRECATED_API
2161 /**
2162 * One more than the highest normal UGraphemeClusterBreak value.
2163 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_GRAPHEME_CLUSTER_BREAK).
2164 *
2165 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2166 */
2167 U_GCB_COUNT = 18
2168#endif // U_HIDE_DEPRECATED_API
2169} UGraphemeClusterBreak;
2170
2171/**
2172 * Word Break constants.
2173 * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.)
2174 *
2175 * @see UCHAR_WORD_BREAK
2176 * @stable ICU 3.4
2177 */
2178typedef enum UWordBreakValues {
2179 /*
2180 * Note: UWordBreakValues constants are parsed by preparseucd.py.
2181 * It matches lines like
2182 * U_WB_<Unicode Word_Break value name>
2183 */
2184
2185 U_WB_OTHER = 0, /*[XX]*/
2186 U_WB_ALETTER = 1, /*[LE]*/
2187 U_WB_FORMAT = 2, /*[FO]*/
2188 U_WB_KATAKANA = 3, /*[KA]*/
2189 U_WB_MIDLETTER = 4, /*[ML]*/
2190 U_WB_MIDNUM = 5, /*[MN]*/
2191 U_WB_NUMERIC = 6, /*[NU]*/
2192 U_WB_EXTENDNUMLET = 7, /*[EX]*/
2193 /** @stable ICU 4.0 */
2194 U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */
2195 /** @stable ICU 4.0 */
2196 U_WB_EXTEND = 9, /*[Extend]*/
2197 /** @stable ICU 4.0 */
2198 U_WB_LF = 10, /*[LF]*/
2199 /** @stable ICU 4.0 */
2200 U_WB_MIDNUMLET =11, /*[MB]*/
2201 /** @stable ICU 4.0 */
2202 U_WB_NEWLINE =12, /*[NL]*/
2203 /** @stable ICU 50 */
2204 U_WB_REGIONAL_INDICATOR = 13, /*[RI]*/ /* new in Unicode 6.2/ICU 50 */
2205 /** @stable ICU 52 */
2206 U_WB_HEBREW_LETTER = 14, /*[HL]*/ /* from here on: new in Unicode 6.3/ICU 52 */
2207 /** @stable ICU 52 */
2208 U_WB_SINGLE_QUOTE = 15, /*[SQ]*/
2209 /** @stable ICU 52 */
2210 U_WB_DOUBLE_QUOTE = 16, /*[DQ]*/
2211 /** @stable ICU 58 */
2212 U_WB_E_BASE = 17, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */
2213 /** @stable ICU 58 */
2214 U_WB_E_BASE_GAZ = 18, /*[EBG]*/
2215 /** @stable ICU 58 */
2216 U_WB_E_MODIFIER = 19, /*[EM]*/
2217 /** @stable ICU 58 */
2218 U_WB_GLUE_AFTER_ZWJ = 20, /*[GAZ]*/
2219 /** @stable ICU 58 */
2220 U_WB_ZWJ = 21, /*[ZWJ]*/
2221 /** @stable ICU 62 */
2222 U_WB_WSEGSPACE = 22, /*[WSEGSPACE]*/
2223
2224#ifndef U_HIDE_DEPRECATED_API
2225 /**
2226 * One more than the highest normal UWordBreakValues value.
2227 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_WORD_BREAK).
2228 *
2229 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2230 */
2231 U_WB_COUNT = 23
2232#endif // U_HIDE_DEPRECATED_API
2233} UWordBreakValues;
2234
2235/**
2236 * Sentence Break constants.
2237 *
2238 * @see UCHAR_SENTENCE_BREAK
2239 * @stable ICU 3.4
2240 */
2241typedef enum USentenceBreak {
2242 /*
2243 * Note: USentenceBreak constants are parsed by preparseucd.py.
2244 * It matches lines like
2245 * U_SB_<Unicode Sentence_Break value name>
2246 */
2247
2248 U_SB_OTHER = 0, /*[XX]*/
2249 U_SB_ATERM = 1, /*[AT]*/
2250 U_SB_CLOSE = 2, /*[CL]*/
2251 U_SB_FORMAT = 3, /*[FO]*/
2252 U_SB_LOWER = 4, /*[LO]*/
2253 U_SB_NUMERIC = 5, /*[NU]*/
2254 U_SB_OLETTER = 6, /*[LE]*/
2255 U_SB_SEP = 7, /*[SE]*/
2256 U_SB_SP = 8, /*[SP]*/
2257 U_SB_STERM = 9, /*[ST]*/
2258 U_SB_UPPER = 10, /*[UP]*/
2259 U_SB_CR = 11, /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */
2260 U_SB_EXTEND = 12, /*[EX]*/
2261 U_SB_LF = 13, /*[LF]*/
2262 U_SB_SCONTINUE = 14, /*[SC]*/
2263#ifndef U_HIDE_DEPRECATED_API
2264 /**
2265 * One more than the highest normal USentenceBreak value.
2266 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_SENTENCE_BREAK).
2267 *
2268 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2269 */
2270 U_SB_COUNT = 15
2271#endif // U_HIDE_DEPRECATED_API
2272} USentenceBreak;
2273
2274/**
2275 * Line Break constants.
2276 *
2277 * @see UCHAR_LINE_BREAK
2278 * @stable ICU 2.2
2279 */
2280typedef enum ULineBreak {
2281 /*
2282 * Note: ULineBreak constants are parsed by preparseucd.py.
2283 * It matches lines like
2284 * U_LB_<Unicode Line_Break value name>
2285 */
2286
2287 U_LB_UNKNOWN = 0, /*[XX]*/
2288 U_LB_AMBIGUOUS = 1, /*[AI]*/
2289 U_LB_ALPHABETIC = 2, /*[AL]*/
2290 U_LB_BREAK_BOTH = 3, /*[B2]*/
2291 U_LB_BREAK_AFTER = 4, /*[BA]*/
2292 U_LB_BREAK_BEFORE = 5, /*[BB]*/
2293 U_LB_MANDATORY_BREAK = 6, /*[BK]*/
2294 U_LB_CONTINGENT_BREAK = 7, /*[CB]*/
2295 U_LB_CLOSE_PUNCTUATION = 8, /*[CL]*/
2296 U_LB_COMBINING_MARK = 9, /*[CM]*/
2297 U_LB_CARRIAGE_RETURN = 10, /*[CR]*/
2298 U_LB_EXCLAMATION = 11, /*[EX]*/
2299 U_LB_GLUE = 12, /*[GL]*/
2300 U_LB_HYPHEN = 13, /*[HY]*/
2301 U_LB_IDEOGRAPHIC = 14, /*[ID]*/
2302 /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0 @stable ICU 3.0 */
2303 U_LB_INSEPARABLE = 15, /*[IN]*/
2304 U_LB_INSEPERABLE = U_LB_INSEPARABLE,
2305 U_LB_INFIX_NUMERIC = 16, /*[IS]*/
2306 U_LB_LINE_FEED = 17, /*[LF]*/
2307 U_LB_NONSTARTER = 18, /*[NS]*/
2308 U_LB_NUMERIC = 19, /*[NU]*/
2309 U_LB_OPEN_PUNCTUATION = 20, /*[OP]*/
2310 U_LB_POSTFIX_NUMERIC = 21, /*[PO]*/
2311 U_LB_PREFIX_NUMERIC = 22, /*[PR]*/
2312 U_LB_QUOTATION = 23, /*[QU]*/
2313 U_LB_COMPLEX_CONTEXT = 24, /*[SA]*/
2314 U_LB_SURROGATE = 25, /*[SG]*/
2315 U_LB_SPACE = 26, /*[SP]*/
2316 U_LB_BREAK_SYMBOLS = 27, /*[SY]*/
2317 U_LB_ZWSPACE = 28, /*[ZW]*/
2318 /** @stable ICU 2.6 */
2319 U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4/ICU 2.6 */
2320 /** @stable ICU 2.6 */
2321 U_LB_WORD_JOINER = 30, /*[WJ]*/
2322 /** @stable ICU 3.4 */
2323 U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4.1/ICU 3.4 */
2324 /** @stable ICU 3.4 */
2325 U_LB_H3 = 32, /*[H3]*/
2326 /** @stable ICU 3.4 */
2327 U_LB_JL = 33, /*[JL]*/
2328 /** @stable ICU 3.4 */
2329 U_LB_JT = 34, /*[JT]*/
2330 /** @stable ICU 3.4 */
2331 U_LB_JV = 35, /*[JV]*/
2332 /** @stable ICU 4.4 */
2333 U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */
2334 /** @stable ICU 49 */
2335 U_LB_CONDITIONAL_JAPANESE_STARTER = 37,/*[CJ]*/ /* new in Unicode 6.1/ICU 49 */
2336 /** @stable ICU 49 */
2337 U_LB_HEBREW_LETTER = 38, /*[HL]*/ /* new in Unicode 6.1/ICU 49 */
2338 /** @stable ICU 50 */
2339 U_LB_REGIONAL_INDICATOR = 39,/*[RI]*/ /* new in Unicode 6.2/ICU 50 */
2340 /** @stable ICU 58 */
2341 U_LB_E_BASE = 40, /*[EB]*/ /* from here on: new in Unicode 9.0/ICU 58 */
2342 /** @stable ICU 58 */
2343 U_LB_E_MODIFIER = 41, /*[EM]*/
2344 /** @stable ICU 58 */
2345 U_LB_ZWJ = 42, /*[ZWJ]*/
2346#ifndef U_HIDE_DEPRECATED_API
2347 /**
2348 * One more than the highest normal ULineBreak value.
2349 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_LINE_BREAK).
2350 *
2351 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2352 */
2353 U_LB_COUNT = 43
2354#endif // U_HIDE_DEPRECATED_API
2355} ULineBreak;
2356
2357/**
2358 * Numeric Type constants.
2359 *
2360 * @see UCHAR_NUMERIC_TYPE
2361 * @stable ICU 2.2
2362 */
2363typedef enum UNumericType {
2364 /*
2365 * Note: UNumericType constants are parsed by preparseucd.py.
2366 * It matches lines like
2367 * U_NT_<Unicode Numeric_Type value name>
2368 */
2369
2370 U_NT_NONE, /*[None]*/
2371 U_NT_DECIMAL, /*[de]*/
2372 U_NT_DIGIT, /*[di]*/
2373 U_NT_NUMERIC, /*[nu]*/
2374#ifndef U_HIDE_DEPRECATED_API
2375 /**
2376 * One more than the highest normal UNumericType value.
2377 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_NUMERIC_TYPE).
2378 *
2379 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2380 */
2381 U_NT_COUNT
2382#endif // U_HIDE_DEPRECATED_API
2383} UNumericType;
2384
2385/**
2386 * Hangul Syllable Type constants.
2387 *
2388 * @see UCHAR_HANGUL_SYLLABLE_TYPE
2389 * @stable ICU 2.6
2390 */
2391typedef enum UHangulSyllableType {
2392 /*
2393 * Note: UHangulSyllableType constants are parsed by preparseucd.py.
2394 * It matches lines like
2395 * U_HST_<Unicode Hangul_Syllable_Type value name>
2396 */
2397
2398 U_HST_NOT_APPLICABLE, /*[NA]*/
2399 U_HST_LEADING_JAMO, /*[L]*/
2400 U_HST_VOWEL_JAMO, /*[V]*/
2401 U_HST_TRAILING_JAMO, /*[T]*/
2402 U_HST_LV_SYLLABLE, /*[LV]*/
2403 U_HST_LVT_SYLLABLE, /*[LVT]*/
2404#ifndef U_HIDE_DEPRECATED_API
2405 /**
2406 * One more than the highest normal UHangulSyllableType value.
2407 * The highest value is available via u_getIntPropertyMaxValue(UCHAR_HANGUL_SYLLABLE_TYPE).
2408 *
2409 * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2410 */
2411 U_HST_COUNT
2412#endif // U_HIDE_DEPRECATED_API
2413} UHangulSyllableType;
2414
2415/**
2416 * Indic Positional Category constants.
2417 *
2418 * @see UCHAR_INDIC_POSITIONAL_CATEGORY
2419 * @stable ICU 63
2420 */
2421typedef enum UIndicPositionalCategory {
2422 /*
2423 * Note: UIndicPositionalCategory constants are parsed by preparseucd.py.
2424 * It matches lines like
2425 * U_INPC_<Unicode Indic_Positional_Category value name>
2426 */
2427
2428 /** @stable ICU 63 */
2429 U_INPC_NA,
2430 /** @stable ICU 63 */
2431 U_INPC_BOTTOM,
2432 /** @stable ICU 63 */
2433 U_INPC_BOTTOM_AND_LEFT,
2434 /** @stable ICU 63 */
2435 U_INPC_BOTTOM_AND_RIGHT,
2436 /** @stable ICU 63 */
2437 U_INPC_LEFT,
2438 /** @stable ICU 63 */
2439 U_INPC_LEFT_AND_RIGHT,
2440 /** @stable ICU 63 */
2441 U_INPC_OVERSTRUCK,
2442 /** @stable ICU 63 */
2443 U_INPC_RIGHT,
2444 /** @stable ICU 63 */
2445 U_INPC_TOP,
2446 /** @stable ICU 63 */
2447 U_INPC_TOP_AND_BOTTOM,
2448 /** @stable ICU 63 */
2449 U_INPC_TOP_AND_BOTTOM_AND_RIGHT,
2450 /** @stable ICU 63 */
2451 U_INPC_TOP_AND_LEFT,
2452 /** @stable ICU 63 */
2453 U_INPC_TOP_AND_LEFT_AND_RIGHT,
2454 /** @stable ICU 63 */
2455 U_INPC_TOP_AND_RIGHT,
2456 /** @stable ICU 63 */
2457 U_INPC_VISUAL_ORDER_LEFT,
2458 /** @stable ICU 66 */
2459 U_INPC_TOP_AND_BOTTOM_AND_LEFT,
2460} UIndicPositionalCategory;
2461
2462/**
2463 * Indic Syllabic Category constants.
2464 *
2465 * @see UCHAR_INDIC_SYLLABIC_CATEGORY
2466 * @stable ICU 63
2467 */
2468typedef enum UIndicSyllabicCategory {
2469 /*
2470 * Note: UIndicSyllabicCategory constants are parsed by preparseucd.py.
2471 * It matches lines like
2472 * U_INSC_<Unicode Indic_Syllabic_Category value name>
2473 */
2474
2475 /** @stable ICU 63 */
2476 U_INSC_OTHER,
2477 /** @stable ICU 63 */
2478 U_INSC_AVAGRAHA,
2479 /** @stable ICU 63 */
2480 U_INSC_BINDU,
2481 /** @stable ICU 63 */
2482 U_INSC_BRAHMI_JOINING_NUMBER,
2483 /** @stable ICU 63 */
2484 U_INSC_CANTILLATION_MARK,
2485 /** @stable ICU 63 */
2486 U_INSC_CONSONANT,
2487 /** @stable ICU 63 */
2488 U_INSC_CONSONANT_DEAD,
2489 /** @stable ICU 63 */
2490 U_INSC_CONSONANT_FINAL,
2491 /** @stable ICU 63 */
2492 U_INSC_CONSONANT_HEAD_LETTER,
2493 /** @stable ICU 63 */
2494 U_INSC_CONSONANT_INITIAL_POSTFIXED,
2495 /** @stable ICU 63 */
2496 U_INSC_CONSONANT_KILLER,
2497 /** @stable ICU 63 */
2498 U_INSC_CONSONANT_MEDIAL,
2499 /** @stable ICU 63 */
2500 U_INSC_CONSONANT_PLACEHOLDER,
2501 /** @stable ICU 63 */
2502 U_INSC_CONSONANT_PRECEDING_REPHA,
2503 /** @stable ICU 63 */
2504 U_INSC_CONSONANT_PREFIXED,
2505 /** @stable ICU 63 */
2506 U_INSC_CONSONANT_SUBJOINED,
2507 /** @stable ICU 63 */
2508 U_INSC_CONSONANT_SUCCEEDING_REPHA,
2509 /** @stable ICU 63 */
2510 U_INSC_CONSONANT_WITH_STACKER,
2511 /** @stable ICU 63 */
2512 U_INSC_GEMINATION_MARK,
2513 /** @stable ICU 63 */
2514 U_INSC_INVISIBLE_STACKER,
2515 /** @stable ICU 63 */
2516 U_INSC_JOINER,
2517 /** @stable ICU 63 */
2518 U_INSC_MODIFYING_LETTER,
2519 /** @stable ICU 63 */
2520 U_INSC_NON_JOINER,
2521 /** @stable ICU 63 */
2522 U_INSC_NUKTA,
2523 /** @stable ICU 63 */
2524 U_INSC_NUMBER,
2525 /** @stable ICU 63 */
2526 U_INSC_NUMBER_JOINER,
2527 /** @stable ICU 63 */
2528 U_INSC_PURE_KILLER,
2529 /** @stable ICU 63 */
2530 U_INSC_REGISTER_SHIFTER,
2531 /** @stable ICU 63 */
2532 U_INSC_SYLLABLE_MODIFIER,
2533 /** @stable ICU 63 */
2534 U_INSC_TONE_LETTER,
2535 /** @stable ICU 63 */
2536 U_INSC_TONE_MARK,
2537 /** @stable ICU 63 */
2538 U_INSC_VIRAMA,
2539 /** @stable ICU 63 */
2540 U_INSC_VISARGA,
2541 /** @stable ICU 63 */
2542 U_INSC_VOWEL,
2543 /** @stable ICU 63 */
2544 U_INSC_VOWEL_DEPENDENT,
2545 /** @stable ICU 63 */
2546 U_INSC_VOWEL_INDEPENDENT,
2547} UIndicSyllabicCategory;
2548
2549/**
2550 * Vertical Orientation constants.
2551 *
2552 * @see UCHAR_VERTICAL_ORIENTATION
2553 * @stable ICU 63
2554 */
2555typedef enum UVerticalOrientation {
2556 /*
2557 * Note: UVerticalOrientation constants are parsed by preparseucd.py.
2558 * It matches lines like
2559 * U_VO_<Unicode Vertical_Orientation value name>
2560 */
2561
2562 /** @stable ICU 63 */
2563 U_VO_ROTATED,
2564 /** @stable ICU 63 */
2565 U_VO_TRANSFORMED_ROTATED,
2566 /** @stable ICU 63 */
2567 U_VO_TRANSFORMED_UPRIGHT,
2568 /** @stable ICU 63 */
2569 U_VO_UPRIGHT,
2570} UVerticalOrientation;
2571
2572/**
2573 * Check a binary Unicode property for a code point.
2574 *
2575 * Unicode, especially in version 3.2, defines many more properties than the
2576 * original set in UnicodeData.txt.
2577 *
2578 * The properties APIs are intended to reflect Unicode properties as defined
2579 * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR).
2580 * For details about the properties see http://www.unicode.org/ucd/ .
2581 * For names of Unicode properties see the UCD file PropertyAliases.txt.
2582 *
2583 * Important: If ICU is built with UCD files from Unicode versions below 3.2,
2584 * then properties marked with "new in Unicode 3.2" are not or not fully available.
2585 *
2586 * @param c Code point to test.
2587 * @param which UProperty selector constant, identifies which binary property to check.
2588 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT.
2589 * @return TRUE or FALSE according to the binary Unicode property value for c.
2590 * Also FALSE if 'which' is out of bounds or if the Unicode version
2591 * does not have data for the property at all, or not for this code point.
2592 *
2593 * @see UProperty
2594 * @see u_getBinaryPropertySet
2595 * @see u_getIntPropertyValue
2596 * @see u_getUnicodeVersion
2597 * @stable ICU 2.1
2598 */
2599U_STABLE UBool U_EXPORT2
2600u_hasBinaryProperty(UChar32 c, UProperty which);
2601
2602/**
2603 * Returns a frozen USet for a binary property.
2604 * The library retains ownership over the returned object.
2605 * Sets an error code if the property number is not one for a binary property.
2606 *
2607 * The returned set contains all code points for which the property is true.
2608 *
2609 * @param property UCHAR_BINARY_START..UCHAR_BINARY_LIMIT-1
2610 * @param pErrorCode an in/out ICU UErrorCode
2611 * @return the property as a set
2612 * @see UProperty
2613 * @see u_hasBinaryProperty
2614 * @see Unicode::fromUSet
2615 * @stable ICU 63
2616 */
2617U_CAPI const USet * U_EXPORT2
2618u_getBinaryPropertySet(UProperty property, UErrorCode *pErrorCode);
2619
2620/**
2621 * Check if a code point has the Alphabetic Unicode property.
2622 * Same as u_hasBinaryProperty(c, UCHAR_ALPHABETIC).
2623 * This is different from u_isalpha!
2624 * @param c Code point to test
2625 * @return true if the code point has the Alphabetic Unicode property, false otherwise
2626 *
2627 * @see UCHAR_ALPHABETIC
2628 * @see u_isalpha
2629 * @see u_hasBinaryProperty
2630 * @stable ICU 2.1
2631 */
2632U_STABLE UBool U_EXPORT2
2633u_isUAlphabetic(UChar32 c);
2634
2635/**
2636 * Check if a code point has the Lowercase Unicode property.
2637 * Same as u_hasBinaryProperty(c, UCHAR_LOWERCASE).
2638 * This is different from u_islower!
2639 * @param c Code point to test
2640 * @return true if the code point has the Lowercase Unicode property, false otherwise
2641 *
2642 * @see UCHAR_LOWERCASE
2643 * @see u_islower
2644 * @see u_hasBinaryProperty
2645 * @stable ICU 2.1
2646 */
2647U_STABLE UBool U_EXPORT2
2648u_isULowercase(UChar32 c);
2649
2650/**
2651 * Check if a code point has the Uppercase Unicode property.
2652 * Same as u_hasBinaryProperty(c, UCHAR_UPPERCASE).
2653 * This is different from u_isupper!
2654 * @param c Code point to test
2655 * @return true if the code point has the Uppercase Unicode property, false otherwise
2656 *
2657 * @see UCHAR_UPPERCASE
2658 * @see u_isupper
2659 * @see u_hasBinaryProperty
2660 * @stable ICU 2.1
2661 */
2662U_STABLE UBool U_EXPORT2
2663u_isUUppercase(UChar32 c);
2664
2665/**
2666 * Check if a code point has the White_Space Unicode property.
2667 * Same as u_hasBinaryProperty(c, UCHAR_WHITE_SPACE).
2668 * This is different from both u_isspace and u_isWhitespace!
2669 *
2670 * Note: There are several ICU whitespace functions; please see the uchar.h
2671 * file documentation for a detailed comparison.
2672 *
2673 * @param c Code point to test
2674 * @return true if the code point has the White_Space Unicode property, false otherwise.
2675 *
2676 * @see UCHAR_WHITE_SPACE
2677 * @see u_isWhitespace
2678 * @see u_isspace
2679 * @see u_isJavaSpaceChar
2680 * @see u_hasBinaryProperty
2681 * @stable ICU 2.1
2682 */
2683U_STABLE UBool U_EXPORT2
2684u_isUWhiteSpace(UChar32 c);
2685
2686/**
2687 * Get the property value for an enumerated or integer Unicode property for a code point.
2688 * Also returns binary and mask property values.
2689 *
2690 * Unicode, especially in version 3.2, defines many more properties than the
2691 * original set in UnicodeData.txt.
2692 *
2693 * The properties APIs are intended to reflect Unicode properties as defined
2694 * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR).
2695 * For details about the properties see http://www.unicode.org/ .
2696 * For names of Unicode properties see the UCD file PropertyAliases.txt.
2697 *
2698 * Sample usage:
2699 * UEastAsianWidth ea=(UEastAsianWidth)u_getIntPropertyValue(c, UCHAR_EAST_ASIAN_WIDTH);
2700 * UBool b=(UBool)u_getIntPropertyValue(c, UCHAR_IDEOGRAPHIC);
2701 *
2702 * @param c Code point to test.
2703 * @param which UProperty selector constant, identifies which property to check.
2704 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
2705 * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT
2706 * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT.
2707 * @return Numeric value that is directly the property value or,
2708 * for enumerated properties, corresponds to the numeric value of the enumerated
2709 * constant of the respective property value enumeration type
2710 * (cast to enum type if necessary).
2711 * Returns 0 or 1 (for FALSE/TRUE) for binary Unicode properties.
2712 * Returns a bit-mask for mask properties.
2713 * Returns 0 if 'which' is out of bounds or if the Unicode version
2714 * does not have data for the property at all, or not for this code point.
2715 *
2716 * @see UProperty
2717 * @see u_hasBinaryProperty
2718 * @see u_getIntPropertyMinValue
2719 * @see u_getIntPropertyMaxValue
2720 * @see u_getIntPropertyMap
2721 * @see u_getUnicodeVersion
2722 * @stable ICU 2.2
2723 */
2724U_STABLE int32_t U_EXPORT2
2725u_getIntPropertyValue(UChar32 c, UProperty which);
2726
2727/**
2728 * Get the minimum value for an enumerated/integer/binary Unicode property.
2729 * Can be used together with u_getIntPropertyMaxValue
2730 * to allocate arrays of UnicodeSet or similar.
2731 *
2732 * @param which UProperty selector constant, identifies which binary property to check.
2733 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
2734 * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT.
2735 * @return Minimum value returned by u_getIntPropertyValue for a Unicode property.
2736 * 0 if the property selector is out of range.
2737 *
2738 * @see UProperty
2739 * @see u_hasBinaryProperty
2740 * @see u_getUnicodeVersion
2741 * @see u_getIntPropertyMaxValue
2742 * @see u_getIntPropertyValue
2743 * @stable ICU 2.2
2744 */
2745U_STABLE int32_t U_EXPORT2
2746u_getIntPropertyMinValue(UProperty which);
2747
2748/**
2749 * Get the maximum value for an enumerated/integer/binary Unicode property.
2750 * Can be used together with u_getIntPropertyMinValue
2751 * to allocate arrays of UnicodeSet or similar.
2752 *
2753 * Examples for min/max values (for Unicode 3.2):
2754 *
2755 * - UCHAR_BIDI_CLASS: 0/18 (U_LEFT_TO_RIGHT/U_BOUNDARY_NEUTRAL)
2756 * - UCHAR_SCRIPT: 0/45 (USCRIPT_COMMON/USCRIPT_TAGBANWA)
2757 * - UCHAR_IDEOGRAPHIC: 0/1 (FALSE/TRUE)
2758 *
2759 * For undefined UProperty constant values, min/max values will be 0/-1.
2760 *
2761 * @param which UProperty selector constant, identifies which binary property to check.
2762 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
2763 * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT.
2764 * @return Maximum value returned by u_getIntPropertyValue for a Unicode property.
2765 * <=0 if the property selector is out of range.
2766 *
2767 * @see UProperty
2768 * @see u_hasBinaryProperty
2769 * @see u_getUnicodeVersion
2770 * @see u_getIntPropertyMaxValue
2771 * @see u_getIntPropertyValue
2772 * @stable ICU 2.2
2773 */
2774U_STABLE int32_t U_EXPORT2
2775u_getIntPropertyMaxValue(UProperty which);
2776
2777/**
2778 * Returns an immutable UCPMap for an enumerated/catalog/int-valued property.
2779 * The library retains ownership over the returned object.
2780 * Sets an error code if the property number is not one for an "int property".
2781 *
2782 * The returned object maps all Unicode code points to their values for that property.
2783 * For documentation of the integer values see u_getIntPropertyValue().
2784 *
2785 * @param property UCHAR_INT_START..UCHAR_INT_LIMIT-1
2786 * @param pErrorCode an in/out ICU UErrorCode
2787 * @return the property as a map
2788 * @see UProperty
2789 * @see u_getIntPropertyValue
2790 * @stable ICU 63
2791 */
2792U_CAPI const UCPMap * U_EXPORT2
2793u_getIntPropertyMap(UProperty property, UErrorCode *pErrorCode);
2794
2795/**
2796 * Get the numeric value for a Unicode code point as defined in the
2797 * Unicode Character Database.
2798 *
2799 * A "double" return type is necessary because
2800 * some numeric values are fractions, negative, or too large for int32_t.
2801 *
2802 * For characters without any numeric values in the Unicode Character Database,
2803 * this function will return U_NO_NUMERIC_VALUE.
2804 * Note: This is different from the Unicode Standard which specifies NaN as the default value.
2805 * (NaN is not available on all platforms.)
2806 *
2807 * Similar to java.lang.Character.getNumericValue(), but u_getNumericValue()
2808 * also supports negative values, large values, and fractions,
2809 * while Java's getNumericValue() returns values 10..35 for ASCII letters.
2810 *
2811 * @param c Code point to get the numeric value for.
2812 * @return Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined.
2813 *
2814 * @see U_NO_NUMERIC_VALUE
2815 * @stable ICU 2.2
2816 */
2817U_STABLE double U_EXPORT2
2818u_getNumericValue(UChar32 c);
2819
2820/**
2821 * Special value that is returned by u_getNumericValue when
2822 * no numeric value is defined for a code point.
2823 *
2824 * @see u_getNumericValue
2825 * @stable ICU 2.2
2826 */
2827#define U_NO_NUMERIC_VALUE ((double)-123456789.)
2828
2829/**
2830 * Determines whether the specified code point has the general category "Ll"
2831 * (lowercase letter).
2832 *
2833 * Same as java.lang.Character.isLowerCase().
2834 *
2835 * This misses some characters that are also lowercase but
2836 * have a different general category value.
2837 * In order to include those, use UCHAR_LOWERCASE.
2838 *
2839 * In addition to being equivalent to a Java function, this also serves
2840 * as a C/POSIX migration function.
2841 * See the comments about C/POSIX character classification functions in the
2842 * documentation at the top of this header file.
2843 *
2844 * @param c the code point to be tested
2845 * @return TRUE if the code point is an Ll lowercase letter
2846 *
2847 * @see UCHAR_LOWERCASE
2848 * @see u_isupper
2849 * @see u_istitle
2850 * @stable ICU 2.0
2851 */
2852U_STABLE UBool U_EXPORT2
2853u_islower(UChar32 c);
2854
2855/**
2856 * Determines whether the specified code point has the general category "Lu"
2857 * (uppercase letter).
2858 *
2859 * Same as java.lang.Character.isUpperCase().
2860 *
2861 * This misses some characters that are also uppercase but
2862 * have a different general category value.
2863 * In order to include those, use UCHAR_UPPERCASE.
2864 *
2865 * In addition to being equivalent to a Java function, this also serves
2866 * as a C/POSIX migration function.
2867 * See the comments about C/POSIX character classification functions in the
2868 * documentation at the top of this header file.
2869 *
2870 * @param c the code point to be tested
2871 * @return TRUE if the code point is an Lu uppercase letter
2872 *
2873 * @see UCHAR_UPPERCASE
2874 * @see u_islower
2875 * @see u_istitle
2876 * @see u_tolower
2877 * @stable ICU 2.0
2878 */
2879U_STABLE UBool U_EXPORT2
2880u_isupper(UChar32 c);
2881
2882/**
2883 * Determines whether the specified code point is a titlecase letter.
2884 * True for general category "Lt" (titlecase letter).
2885 *
2886 * Same as java.lang.Character.isTitleCase().
2887 *
2888 * @param c the code point to be tested
2889 * @return TRUE if the code point is an Lt titlecase letter
2890 *
2891 * @see u_isupper
2892 * @see u_islower
2893 * @see u_totitle
2894 * @stable ICU 2.0
2895 */
2896U_STABLE UBool U_EXPORT2
2897u_istitle(UChar32 c);
2898
2899/**
2900 * Determines whether the specified code point is a digit character according to Java.
2901 * True for characters with general category "Nd" (decimal digit numbers).
2902 * Beginning with Unicode 4, this is the same as
2903 * testing for the Numeric_Type of Decimal.
2904 *
2905 * Same as java.lang.Character.isDigit().
2906 *
2907 * In addition to being equivalent to a Java function, this also serves
2908 * as a C/POSIX migration function.
2909 * See the comments about C/POSIX character classification functions in the
2910 * documentation at the top of this header file.
2911 *
2912 * @param c the code point to be tested
2913 * @return TRUE if the code point is a digit character according to Character.isDigit()
2914 *
2915 * @stable ICU 2.0
2916 */
2917U_STABLE UBool U_EXPORT2
2918u_isdigit(UChar32 c);
2919
2920/**
2921 * Determines whether the specified code point is a letter character.
2922 * True for general categories "L" (letters).
2923 *
2924 * Same as java.lang.Character.isLetter().
2925 *
2926 * In addition to being equivalent to a Java function, this also serves
2927 * as a C/POSIX migration function.
2928 * See the comments about C/POSIX character classification functions in the
2929 * documentation at the top of this header file.
2930 *
2931 * @param c the code point to be tested
2932 * @return TRUE if the code point is a letter character
2933 *
2934 * @see u_isdigit
2935 * @see u_isalnum
2936 * @stable ICU 2.0
2937 */
2938U_STABLE UBool U_EXPORT2
2939u_isalpha(UChar32 c);
2940
2941/**
2942 * Determines whether the specified code point is an alphanumeric character
2943 * (letter or digit) according to Java.
2944 * True for characters with general categories
2945 * "L" (letters) and "Nd" (decimal digit numbers).
2946 *
2947 * Same as java.lang.Character.isLetterOrDigit().
2948 *
2949 * In addition to being equivalent to a Java function, this also serves
2950 * as a C/POSIX migration function.
2951 * See the comments about C/POSIX character classification functions in the
2952 * documentation at the top of this header file.
2953 *
2954 * @param c the code point to be tested
2955 * @return TRUE if the code point is an alphanumeric character according to Character.isLetterOrDigit()
2956 *
2957 * @stable ICU 2.0
2958 */
2959U_STABLE UBool U_EXPORT2
2960u_isalnum(UChar32 c);
2961
2962/**
2963 * Determines whether the specified code point is a hexadecimal digit.
2964 * This is equivalent to u_digit(c, 16)>=0.
2965 * True for characters with general category "Nd" (decimal digit numbers)
2966 * as well as Latin letters a-f and A-F in both ASCII and Fullwidth ASCII.
2967 * (That is, for letters with code points
2968 * 0041..0046, 0061..0066, FF21..FF26, FF41..FF46.)
2969 *
2970 * In order to narrow the definition of hexadecimal digits to only ASCII
2971 * characters, use (c<=0x7f && u_isxdigit(c)).
2972 *
2973 * This is a C/POSIX migration function.
2974 * See the comments about C/POSIX character classification functions in the
2975 * documentation at the top of this header file.
2976 *
2977 * @param c the code point to be tested
2978 * @return TRUE if the code point is a hexadecimal digit
2979 *
2980 * @stable ICU 2.6
2981 */
2982U_STABLE UBool U_EXPORT2
2983u_isxdigit(UChar32 c);
2984
2985/**
2986 * Determines whether the specified code point is a punctuation character.
2987 * True for characters with general categories "P" (punctuation).
2988 *
2989 * This is a C/POSIX migration function.
2990 * See the comments about C/POSIX character classification functions in the
2991 * documentation at the top of this header file.
2992 *
2993 * @param c the code point to be tested
2994 * @return TRUE if the code point is a punctuation character
2995 *
2996 * @stable ICU 2.6
2997 */
2998U_STABLE UBool U_EXPORT2
2999u_ispunct(UChar32 c);
3000
3001/**
3002 * Determines whether the specified code point is a "graphic" character
3003 * (printable, excluding spaces).
3004 * TRUE for all characters except those with general categories
3005 * "Cc" (control codes), "Cf" (format controls), "Cs" (surrogates),
3006 * "Cn" (unassigned), and "Z" (separators).
3007 *
3008 * This is a C/POSIX migration function.
3009 * See the comments about C/POSIX character classification functions in the
3010 * documentation at the top of this header file.
3011 *
3012 * @param c the code point to be tested
3013 * @return TRUE if the code point is a "graphic" character
3014 *
3015 * @stable ICU 2.6
3016 */
3017U_STABLE UBool U_EXPORT2
3018u_isgraph(UChar32 c);
3019
3020/**
3021 * Determines whether the specified code point is a "blank" or "horizontal space",
3022 * a character that visibly separates words on a line.
3023 * The following are equivalent definitions:
3024 *
3025 * TRUE for Unicode White_Space characters except for "vertical space controls"
3026 * where "vertical space controls" are the following characters:
3027 * U+000A (LF) U+000B (VT) U+000C (FF) U+000D (CR) U+0085 (NEL) U+2028 (LS) U+2029 (PS)
3028 *
3029 * same as
3030 *
3031 * TRUE for U+0009 (TAB) and characters with general category "Zs" (space separators).
3032 *
3033 * Note: There are several ICU whitespace functions; please see the uchar.h
3034 * file documentation for a detailed comparison.
3035 *
3036 * This is a C/POSIX migration function.
3037 * See the comments about C/POSIX character classification functions in the
3038 * documentation at the top of this header file.
3039 *
3040 * @param c the code point to be tested
3041 * @return TRUE if the code point is a "blank"
3042 *
3043 * @stable ICU 2.6
3044 */
3045U_STABLE UBool U_EXPORT2
3046u_isblank(UChar32 c);
3047
3048/**
3049 * Determines whether the specified code point is "defined",
3050 * which usually means that it is assigned a character.
3051 * True for general categories other than "Cn" (other, not assigned),
3052 * i.e., true for all code points mentioned in UnicodeData.txt.
3053 *
3054 * Note that non-character code points (e.g., U+FDD0) are not "defined"
3055 * (they are Cn), but surrogate code points are "defined" (Cs).
3056 *
3057 * Same as java.lang.Character.isDefined().
3058 *
3059 * @param c the code point to be tested
3060 * @return TRUE if the code point is assigned a character
3061 *
3062 * @see u_isdigit
3063 * @see u_isalpha
3064 * @see u_isalnum
3065 * @see u_isupper
3066 * @see u_islower
3067 * @see u_istitle
3068 * @stable ICU 2.0
3069 */
3070U_STABLE UBool U_EXPORT2
3071u_isdefined(UChar32 c);
3072
3073/**
3074 * Determines if the specified character is a space character or not.
3075 *
3076 * Note: There are several ICU whitespace functions; please see the uchar.h
3077 * file documentation for a detailed comparison.
3078 *
3079 * This is a C/POSIX migration function.
3080 * See the comments about C/POSIX character classification functions in the
3081 * documentation at the top of this header file.
3082 *
3083 * @param c the character to be tested
3084 * @return true if the character is a space character; false otherwise.
3085 *
3086 * @see u_isJavaSpaceChar
3087 * @see u_isWhitespace
3088 * @see u_isUWhiteSpace
3089 * @stable ICU 2.0
3090 */
3091U_STABLE UBool U_EXPORT2
3092u_isspace(UChar32 c);
3093
3094/**
3095 * Determine if the specified code point is a space character according to Java.
3096 * True for characters with general categories "Z" (separators),
3097 * which does not include control codes (e.g., TAB or Line Feed).
3098 *
3099 * Same as java.lang.Character.isSpaceChar().
3100 *
3101 * Note: There are several ICU whitespace functions; please see the uchar.h
3102 * file documentation for a detailed comparison.
3103 *
3104 * @param c the code point to be tested
3105 * @return TRUE if the code point is a space character according to Character.isSpaceChar()
3106 *
3107 * @see u_isspace
3108 * @see u_isWhitespace
3109 * @see u_isUWhiteSpace
3110 * @stable ICU 2.6
3111 */
3112U_STABLE UBool U_EXPORT2
3113u_isJavaSpaceChar(UChar32 c);
3114
3115/**
3116 * Determines if the specified code point is a whitespace character according to Java/ICU.
3117 * A character is considered to be a Java whitespace character if and only
3118 * if it satisfies one of the following criteria:
3119 *
3120 * - It is a Unicode Separator character (categories "Z" = "Zs" or "Zl" or "Zp"), but is not
3121 * also a non-breaking space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP).
3122 * - It is U+0009 HORIZONTAL TABULATION.
3123 * - It is U+000A LINE FEED.
3124 * - It is U+000B VERTICAL TABULATION.
3125 * - It is U+000C FORM FEED.
3126 * - It is U+000D CARRIAGE RETURN.
3127 * - It is U+001C FILE SEPARATOR.
3128 * - It is U+001D GROUP SEPARATOR.
3129 * - It is U+001E RECORD SEPARATOR.
3130 * - It is U+001F UNIT SEPARATOR.
3131 *
3132 * This API tries to sync with the semantics of Java's
3133 * java.lang.Character.isWhitespace(), but it may not return
3134 * the exact same results because of the Unicode version
3135 * difference.
3136 *
3137 * Note: Unicode 4.0.1 changed U+200B ZERO WIDTH SPACE from a Space Separator (Zs)
3138 * to a Format Control (Cf). Since then, isWhitespace(0x200b) returns false.
3139 * See http://www.unicode.org/versions/Unicode4.0.1/
3140 *
3141 * Note: There are several ICU whitespace functions; please see the uchar.h
3142 * file documentation for a detailed comparison.
3143 *
3144 * @param c the code point to be tested
3145 * @return TRUE if the code point is a whitespace character according to Java/ICU
3146 *
3147 * @see u_isspace
3148 * @see u_isJavaSpaceChar
3149 * @see u_isUWhiteSpace
3150 * @stable ICU 2.0
3151 */
3152U_STABLE UBool U_EXPORT2
3153u_isWhitespace(UChar32 c);
3154
3155/**
3156 * Determines whether the specified code point is a control character
3157 * (as defined by this function).
3158 * A control character is one of the following:
3159 * - ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f)
3160 * - U_CONTROL_CHAR (Cc)
3161 * - U_FORMAT_CHAR (Cf)
3162 * - U_LINE_SEPARATOR (Zl)
3163 * - U_PARAGRAPH_SEPARATOR (Zp)
3164 *
3165 * This is a C/POSIX migration function.
3166 * See the comments about C/POSIX character classification functions in the
3167 * documentation at the top of this header file.
3168 *
3169 * @param c the code point to be tested
3170 * @return TRUE if the code point is a control character
3171 *
3172 * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
3173 * @see u_isprint
3174 * @stable ICU 2.0
3175 */
3176U_STABLE UBool U_EXPORT2
3177u_iscntrl(UChar32 c);
3178
3179/**
3180 * Determines whether the specified code point is an ISO control code.
3181 * True for U+0000..U+001f and U+007f..U+009f (general category "Cc").
3182 *
3183 * Same as java.lang.Character.isISOControl().
3184 *
3185 * @param c the code point to be tested
3186 * @return TRUE if the code point is an ISO control code
3187 *
3188 * @see u_iscntrl
3189 * @stable ICU 2.6
3190 */
3191U_STABLE UBool U_EXPORT2
3192u_isISOControl(UChar32 c);
3193
3194/**
3195 * Determines whether the specified code point is a printable character.
3196 * True for general categories <em>other</em> than "C" (controls).
3197 *
3198 * This is a C/POSIX migration function.
3199 * See the comments about C/POSIX character classification functions in the
3200 * documentation at the top of this header file.
3201 *
3202 * @param c the code point to be tested
3203 * @return TRUE if the code point is a printable character
3204 *
3205 * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
3206 * @see u_iscntrl
3207 * @stable ICU 2.0
3208 */
3209U_STABLE UBool U_EXPORT2
3210u_isprint(UChar32 c);
3211
3212/**
3213 * Non-standard: Determines whether the specified code point is a base character.
3214 * True for general categories "L" (letters), "N" (numbers),
3215 * "Mc" (spacing combining marks), and "Me" (enclosing marks).
3216 *
3217 * Note that this is different from the Unicode Standard definition in
3218 * chapter 3.6, conformance clause D51 “Base character”,
3219 * which defines base characters as the code points with general categories
3220 * Letter (L), Number (N), Punctuation (P), Symbol (S), or Space Separator (Zs).
3221 *
3222 * @param c the code point to be tested
3223 * @return TRUE if the code point is a base character according to this function
3224 *
3225 * @see u_isalpha
3226 * @see u_isdigit
3227 * @stable ICU 2.0
3228 */
3229U_STABLE UBool U_EXPORT2
3230u_isbase(UChar32 c);
3231
3232/**
3233 * Returns the bidirectional category value for the code point,
3234 * which is used in the Unicode bidirectional algorithm
3235 * (UAX #9 http://www.unicode.org/reports/tr9/).
3236 * Note that some <em>unassigned</em> code points have bidi values
3237 * of R or AL because they are in blocks that are reserved
3238 * for Right-To-Left scripts.
3239 *
3240 * Same as java.lang.Character.getDirectionality()
3241 *
3242 * @param c the code point to be tested
3243 * @return the bidirectional category (UCharDirection) value
3244 *
3245 * @see UCharDirection
3246 * @stable ICU 2.0
3247 */
3248U_STABLE UCharDirection U_EXPORT2
3249u_charDirection(UChar32 c);
3250
3251/**
3252 * Determines whether the code point has the Bidi_Mirrored property.
3253 * This property is set for characters that are commonly used in
3254 * Right-To-Left contexts and need to be displayed with a "mirrored"
3255 * glyph.
3256 *
3257 * Same as java.lang.Character.isMirrored().
3258 * Same as UCHAR_BIDI_MIRRORED
3259 *
3260 * @param c the code point to be tested
3261 * @return TRUE if the character has the Bidi_Mirrored property
3262 *
3263 * @see UCHAR_BIDI_MIRRORED
3264 * @stable ICU 2.0
3265 */
3266U_STABLE UBool U_EXPORT2
3267u_isMirrored(UChar32 c);
3268
3269/**
3270 * Maps the specified character to a "mirror-image" character.
3271 * For characters with the Bidi_Mirrored property, implementations
3272 * sometimes need a "poor man's" mapping to another Unicode
3273 * character (code point) such that the default glyph may serve
3274 * as the mirror-image of the default glyph of the specified
3275 * character. This is useful for text conversion to and from
3276 * codepages with visual order, and for displays without glyph
3277 * selection capabilities.
3278 *
3279 * @param c the code point to be mapped
3280 * @return another Unicode code point that may serve as a mirror-image
3281 * substitute, or c itself if there is no such mapping or c
3282 * does not have the Bidi_Mirrored property
3283 *
3284 * @see UCHAR_BIDI_MIRRORED
3285 * @see u_isMirrored
3286 * @stable ICU 2.0
3287 */
3288U_STABLE UChar32 U_EXPORT2
3289u_charMirror(UChar32 c);
3290
3291/**
3292 * Maps the specified character to its paired bracket character.
3293 * For Bidi_Paired_Bracket_Type!=None, this is the same as u_charMirror().
3294 * Otherwise c itself is returned.
3295 * See http://www.unicode.org/reports/tr9/
3296 *
3297 * @param c the code point to be mapped
3298 * @return the paired bracket code point,
3299 * or c itself if there is no such mapping
3300 * (Bidi_Paired_Bracket_Type=None)
3301 *
3302 * @see UCHAR_BIDI_PAIRED_BRACKET
3303 * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE
3304 * @see u_charMirror
3305 * @stable ICU 52
3306 */
3307U_STABLE UChar32 U_EXPORT2
3308u_getBidiPairedBracket(UChar32 c);
3309
3310/**
3311 * Returns the general category value for the code point.
3312 *
3313 * Same as java.lang.Character.getType().
3314 *
3315 * @param c the code point to be tested
3316 * @return the general category (UCharCategory) value
3317 *
3318 * @see UCharCategory
3319 * @stable ICU 2.0
3320 */
3321U_STABLE int8_t U_EXPORT2
3322u_charType(UChar32 c);
3323
3324/**
3325 * Get a single-bit bit set for the general category of a character.
3326 * This bit set can be compared bitwise with U_GC_SM_MASK, U_GC_L_MASK, etc.
3327 * Same as U_MASK(u_charType(c)).
3328 *
3329 * @param c the code point to be tested
3330 * @return a single-bit mask corresponding to the general category (UCharCategory) value
3331 *
3332 * @see u_charType
3333 * @see UCharCategory
3334 * @see U_GC_CN_MASK
3335 * @stable ICU 2.1
3336 */
3337#define U_GET_GC_MASK(c) U_MASK(u_charType(c))
3338
3339/**
3340 * Callback from u_enumCharTypes(), is called for each contiguous range
3341 * of code points c (where start<=c<limit)
3342 * with the same Unicode general category ("character type").
3343 *
3344 * The callback function can stop the enumeration by returning FALSE.
3345 *
3346 * @param context an opaque pointer, as passed into utrie_enum()
3347 * @param start the first code point in a contiguous range with value
3348 * @param limit one past the last code point in a contiguous range with value
3349 * @param type the general category for all code points in [start..limit[
3350 * @return FALSE to stop the enumeration
3351 *
3352 * @stable ICU 2.1
3353 * @see UCharCategory
3354 * @see u_enumCharTypes
3355 */
3356typedef UBool U_CALLCONV
3357UCharEnumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory type);
3358
3359/**
3360 * Enumerate efficiently all code points with their Unicode general categories.
3361 *
3362 * This is useful for building data structures (e.g., UnicodeSet's),
3363 * for enumerating all assigned code points (type!=U_UNASSIGNED), etc.
3364 *
3365 * For each contiguous range of code points with a given general category ("character type"),
3366 * the UCharEnumTypeRange function is called.
3367 * Adjacent ranges have different types.
3368 * The Unicode Standard guarantees that the numeric value of the type is 0..31.
3369 *
3370 * @param enumRange a pointer to a function that is called for each contiguous range
3371 * of code points with the same general category
3372 * @param context an opaque pointer that is passed on to the callback function
3373 *
3374 * @stable ICU 2.1
3375 * @see UCharCategory
3376 * @see UCharEnumTypeRange
3377 */
3378U_STABLE void U_EXPORT2
3379u_enumCharTypes(UCharEnumTypeRange *enumRange, const void *context);
3380
3381#if !UCONFIG_NO_NORMALIZATION
3382
3383/**
3384 * Returns the combining class of the code point as specified in UnicodeData.txt.
3385 *
3386 * @param c the code point of the character
3387 * @return the combining class of the character
3388 * @stable ICU 2.0
3389 */
3390U_STABLE uint8_t U_EXPORT2
3391u_getCombiningClass(UChar32 c);
3392
3393#endif
3394
3395/**
3396 * Returns the decimal digit value of a decimal digit character.
3397 * Such characters have the general category "Nd" (decimal digit numbers)
3398 * and a Numeric_Type of Decimal.
3399 *
3400 * Unlike ICU releases before 2.6, no digit values are returned for any
3401 * Han characters because Han number characters are often used with a special
3402 * Chinese-style number format (with characters for powers of 10 in between)
3403 * instead of in decimal-positional notation.
3404 * Unicode 4 explicitly assigns Han number characters the Numeric_Type
3405 * Numeric instead of Decimal.
3406 * See Jitterbug 1483 for more details.
3407 *
3408 * Use u_getIntPropertyValue(c, UCHAR_NUMERIC_TYPE) and u_getNumericValue()
3409 * for complete numeric Unicode properties.
3410 *
3411 * @param c the code point for which to get the decimal digit value
3412 * @return the decimal digit value of c,
3413 * or -1 if c is not a decimal digit character
3414 *
3415 * @see u_getNumericValue
3416 * @stable ICU 2.0
3417 */
3418U_STABLE int32_t U_EXPORT2
3419u_charDigitValue(UChar32 c);
3420
3421/**
3422 * Returns the Unicode allocation block that contains the character.
3423 *
3424 * @param c the code point to be tested
3425 * @return the block value (UBlockCode) for c
3426 *
3427 * @see UBlockCode
3428 * @stable ICU 2.0
3429 */
3430U_STABLE UBlockCode U_EXPORT2
3431ublock_getCode(UChar32 c);
3432
3433/**
3434 * Retrieve the name of a Unicode character.
3435 * Depending on <code>nameChoice</code>, the character name written
3436 * into the buffer is the "modern" name or the name that was defined
3437 * in Unicode version 1.0.
3438 * The name contains only "invariant" characters
3439 * like A-Z, 0-9, space, and '-'.
3440 * Unicode 1.0 names are only retrieved if they are different from the modern
3441 * names and if the data file contains the data for them. gennames may or may
3442 * not be called with a command line option to include 1.0 names in unames.dat.
3443 *
3444 * @param code The character (code point) for which to get the name.
3445 * It must be <code>0<=code<=0x10ffff</code>.
3446 * @param nameChoice Selector for which name to get.
3447 * @param buffer Destination address for copying the name.
3448 * The name will always be zero-terminated.
3449 * If there is no name, then the buffer will be set to the empty string.
3450 * @param bufferLength <code>==sizeof(buffer)</code>
3451 * @param pErrorCode Pointer to a UErrorCode variable;
3452 * check for <code>U_SUCCESS()</code> after <code>u_charName()</code>
3453 * returns.
3454 * @return The length of the name, or 0 if there is no name for this character.
3455 * If the bufferLength is less than or equal to the length, then the buffer
3456 * contains the truncated name and the returned length indicates the full
3457 * length of the name.
3458 * The length does not include the zero-termination.
3459 *
3460 * @see UCharNameChoice
3461 * @see u_charFromName
3462 * @see u_enumCharNames
3463 * @stable ICU 2.0
3464 */
3465U_STABLE int32_t U_EXPORT2
3466u_charName(UChar32 code, UCharNameChoice nameChoice,
3467 char *buffer, int32_t bufferLength,
3468 UErrorCode *pErrorCode);
3469
3470#ifndef U_HIDE_DEPRECATED_API
3471/**
3472 * Returns an empty string.
3473 * Used to return the ISO 10646 comment for a character.
3474 * The Unicode ISO_Comment property is deprecated and has no values.
3475 *
3476 * @param c The character (code point) for which to get the ISO comment.
3477 * It must be <code>0<=c<=0x10ffff</code>.
3478 * @param dest Destination address for copying the comment.
3479 * The comment will be zero-terminated if possible.
3480 * If there is no comment, then the buffer will be set to the empty string.
3481 * @param destCapacity <code>==sizeof(dest)</code>
3482 * @param pErrorCode Pointer to a UErrorCode variable;
3483 * check for <code>U_SUCCESS()</code> after <code>u_getISOComment()</code>
3484 * returns.
3485 * @return 0
3486 *
3487 * @deprecated ICU 49
3488 */
3489U_DEPRECATED int32_t U_EXPORT2
3490u_getISOComment(UChar32 c,
3491 char *dest, int32_t destCapacity,
3492 UErrorCode *pErrorCode);
3493#endif /* U_HIDE_DEPRECATED_API */
3494
3495/**
3496 * Find a Unicode character by its name and return its code point value.
3497 * The name is matched exactly and completely.
3498 * If the name does not correspond to a code point, <i>pErrorCode</i>
3499 * is set to <code>U_INVALID_CHAR_FOUND</code>.
3500 * A Unicode 1.0 name is matched only if it differs from the modern name.
3501 * Unicode names are all uppercase. Extended names are lowercase followed
3502 * by an uppercase hexadecimal number, and within angle brackets.
3503 *
3504 * @param nameChoice Selector for which name to match.
3505 * @param name The name to match.
3506 * @param pErrorCode Pointer to a UErrorCode variable
3507 * @return The Unicode value of the code point with the given name,
3508 * or an undefined value if there is no such code point.
3509 *
3510 * @see UCharNameChoice
3511 * @see u_charName
3512 * @see u_enumCharNames
3513 * @stable ICU 1.7
3514 */
3515U_STABLE UChar32 U_EXPORT2
3516u_charFromName(UCharNameChoice nameChoice,
3517 const char *name,
3518 UErrorCode *pErrorCode);
3519
3520/**
3521 * Type of a callback function for u_enumCharNames() that gets called
3522 * for each Unicode character with the code point value and
3523 * the character name.
3524 * If such a function returns FALSE, then the enumeration is stopped.
3525 *
3526 * @param context The context pointer that was passed to u_enumCharNames().
3527 * @param code The Unicode code point for the character with this name.
3528 * @param nameChoice Selector for which kind of names is enumerated.
3529 * @param name The character's name, zero-terminated.
3530 * @param length The length of the name.
3531 * @return TRUE if the enumeration should continue, FALSE to stop it.
3532 *
3533 * @see UCharNameChoice
3534 * @see u_enumCharNames
3535 * @stable ICU 1.7
3536 */
3537typedef UBool U_CALLCONV UEnumCharNamesFn(void *context,
3538 UChar32 code,
3539 UCharNameChoice nameChoice,
3540 const char *name,
3541 int32_t length);
3542
3543/**
3544 * Enumerate all assigned Unicode characters between the start and limit
3545 * code points (start inclusive, limit exclusive) and call a function
3546 * for each, passing the code point value and the character name.
3547 * For Unicode 1.0 names, only those are enumerated that differ from the
3548 * modern names.
3549 *
3550 * @param start The first code point in the enumeration range.
3551 * @param limit One more than the last code point in the enumeration range
3552 * (the first one after the range).
3553 * @param fn The function that is to be called for each character name.
3554 * @param context An arbitrary pointer that is passed to the function.
3555 * @param nameChoice Selector for which kind of names to enumerate.
3556 * @param pErrorCode Pointer to a UErrorCode variable
3557 *
3558 * @see UCharNameChoice
3559 * @see UEnumCharNamesFn
3560 * @see u_charName
3561 * @see u_charFromName
3562 * @stable ICU 1.7
3563 */
3564U_STABLE void U_EXPORT2
3565u_enumCharNames(UChar32 start, UChar32 limit,
3566 UEnumCharNamesFn *fn,
3567 void *context,
3568 UCharNameChoice nameChoice,
3569 UErrorCode *pErrorCode);
3570
3571/**
3572 * Return the Unicode name for a given property, as given in the
3573 * Unicode database file PropertyAliases.txt.
3574 *
3575 * In addition, this function maps the property
3576 * UCHAR_GENERAL_CATEGORY_MASK to the synthetic names "gcm" /
3577 * "General_Category_Mask". These names are not in
3578 * PropertyAliases.txt.
3579 *
3580 * @param property UProperty selector other than UCHAR_INVALID_CODE.
3581 * If out of range, NULL is returned.
3582 *
3583 * @param nameChoice selector for which name to get. If out of range,
3584 * NULL is returned. All properties have a long name. Most
3585 * have a short name, but some do not. Unicode allows for
3586 * additional names; if present these will be returned by
3587 * U_LONG_PROPERTY_NAME + i, where i=1, 2,...
3588 *
3589 * @return a pointer to the name, or NULL if either the
3590 * property or the nameChoice is out of range. If a given
3591 * nameChoice returns NULL, then all larger values of
3592 * nameChoice will return NULL, with one exception: if NULL is
3593 * returned for U_SHORT_PROPERTY_NAME, then
3594 * U_LONG_PROPERTY_NAME (and higher) may still return a
3595 * non-NULL value. The returned pointer is valid until
3596 * u_cleanup() is called.
3597 *
3598 * @see UProperty
3599 * @see UPropertyNameChoice
3600 * @stable ICU 2.4
3601 */
3602U_STABLE const char* U_EXPORT2
3603u_getPropertyName(UProperty property,
3604 UPropertyNameChoice nameChoice);
3605
3606/**
3607 * Return the UProperty enum for a given property name, as specified
3608 * in the Unicode database file PropertyAliases.txt. Short, long, and
3609 * any other variants are recognized.
3610 *
3611 * In addition, this function maps the synthetic names "gcm" /
3612 * "General_Category_Mask" to the property
3613 * UCHAR_GENERAL_CATEGORY_MASK. These names are not in
3614 * PropertyAliases.txt.
3615 *
3616 * @param alias the property name to be matched. The name is compared
3617 * using "loose matching" as described in PropertyAliases.txt.
3618 *
3619 * @return a UProperty enum, or UCHAR_INVALID_CODE if the given name
3620 * does not match any property.
3621 *
3622 * @see UProperty
3623 * @stable ICU 2.4
3624 */
3625U_STABLE UProperty U_EXPORT2
3626u_getPropertyEnum(const char* alias);
3627
3628/**
3629 * Return the Unicode name for a given property value, as given in the
3630 * Unicode database file PropertyValueAliases.txt.
3631 *
3632 * Note: Some of the names in PropertyValueAliases.txt can only be
3633 * retrieved using UCHAR_GENERAL_CATEGORY_MASK, not
3634 * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" /
3635 * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P"
3636 * / "Punctuation", "S" / "Symbol", and "Z" / "Separator".
3637 *
3638 * @param property UProperty selector constant.
3639 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
3640 * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT
3641 * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT.
3642 * If out of range, NULL is returned.
3643 *
3644 * @param value selector for a value for the given property. If out
3645 * of range, NULL is returned. In general, valid values range
3646 * from 0 up to some maximum. There are a few exceptions:
3647 * (1.) UCHAR_BLOCK values begin at the non-zero value
3648 * UBLOCK_BASIC_LATIN. (2.) UCHAR_CANONICAL_COMBINING_CLASS
3649 * values are not contiguous and range from 0..240. (3.)
3650 * UCHAR_GENERAL_CATEGORY_MASK values are not values of
3651 * UCharCategory, but rather mask values produced by
3652 * U_GET_GC_MASK(). This allows grouped categories such as
3653 * [:L:] to be represented. Mask values range
3654 * non-contiguously from 1..U_GC_P_MASK.
3655 *
3656 * @param nameChoice selector for which name to get. If out of range,
3657 * NULL is returned. All values have a long name. Most have
3658 * a short name, but some do not. Unicode allows for
3659 * additional names; if present these will be returned by
3660 * U_LONG_PROPERTY_NAME + i, where i=1, 2,...
3661
3662 * @return a pointer to the name, or NULL if either the
3663 * property or the nameChoice is out of range. If a given
3664 * nameChoice returns NULL, then all larger values of
3665 * nameChoice will return NULL, with one exception: if NULL is
3666 * returned for U_SHORT_PROPERTY_NAME, then
3667 * U_LONG_PROPERTY_NAME (and higher) may still return a
3668 * non-NULL value. The returned pointer is valid until
3669 * u_cleanup() is called.
3670 *
3671 * @see UProperty
3672 * @see UPropertyNameChoice
3673 * @stable ICU 2.4
3674 */
3675U_STABLE const char* U_EXPORT2
3676u_getPropertyValueName(UProperty property,
3677 int32_t value,
3678 UPropertyNameChoice nameChoice);
3679
3680/**
3681 * Return the property value integer for a given value name, as
3682 * specified in the Unicode database file PropertyValueAliases.txt.
3683 * Short, long, and any other variants are recognized.
3684 *
3685 * Note: Some of the names in PropertyValueAliases.txt will only be
3686 * recognized with UCHAR_GENERAL_CATEGORY_MASK, not
3687 * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" /
3688 * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P"
3689 * / "Punctuation", "S" / "Symbol", and "Z" / "Separator".
3690 *
3691 * @param property UProperty selector constant.
3692 * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT
3693 * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT
3694 * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT.
3695 * If out of range, UCHAR_INVALID_CODE is returned.
3696 *
3697 * @param alias the value name to be matched. The name is compared
3698 * using "loose matching" as described in
3699 * PropertyValueAliases.txt.
3700 *
3701 * @return a value integer or UCHAR_INVALID_CODE if the given name
3702 * does not match any value of the given property, or if the
3703 * property is invalid. Note: UCHAR_GENERAL_CATEGORY_MASK values
3704 * are not values of UCharCategory, but rather mask values
3705 * produced by U_GET_GC_MASK(). This allows grouped
3706 * categories such as [:L:] to be represented.
3707 *
3708 * @see UProperty
3709 * @stable ICU 2.4
3710 */
3711U_STABLE int32_t U_EXPORT2
3712u_getPropertyValueEnum(UProperty property,
3713 const char* alias);
3714
3715/**
3716 * Determines if the specified character is permissible as the
3717 * first character in an identifier according to Unicode
3718 * (The Unicode Standard, Version 3.0, chapter 5.16 Identifiers).
3719 * True for characters with general categories "L" (letters) and "Nl" (letter numbers).
3720 *
3721 * Same as java.lang.Character.isUnicodeIdentifierStart().
3722 * Same as UCHAR_ID_START
3723 *
3724 * @param c the code point to be tested
3725 * @return TRUE if the code point may start an identifier
3726 *
3727 * @see UCHAR_ID_START
3728 * @see u_isalpha
3729 * @see u_isIDPart
3730 * @stable ICU 2.0
3731 */
3732U_STABLE UBool U_EXPORT2
3733u_isIDStart(UChar32 c);
3734
3735/**
3736 * Determines if the specified character is permissible
3737 * in an identifier according to Java.
3738 * True for characters with general categories "L" (letters),
3739 * "Nl" (letter numbers), "Nd" (decimal digits),
3740 * "Mc" and "Mn" (combining marks), "Pc" (connecting punctuation), and
3741 * u_isIDIgnorable(c).
3742 *
3743 * Same as java.lang.Character.isUnicodeIdentifierPart().
3744 * Almost the same as Unicode's ID_Continue (UCHAR_ID_CONTINUE)
3745 * except that Unicode recommends to ignore Cf which is less than
3746 * u_isIDIgnorable(c).
3747 *
3748 * @param c the code point to be tested
3749 * @return TRUE if the code point may occur in an identifier according to Java
3750 *
3751 * @see UCHAR_ID_CONTINUE
3752 * @see u_isIDStart
3753 * @see u_isIDIgnorable
3754 * @stable ICU 2.0
3755 */
3756U_STABLE UBool U_EXPORT2
3757u_isIDPart(UChar32 c);
3758
3759/**
3760 * Determines if the specified character should be regarded
3761 * as an ignorable character in an identifier,
3762 * according to Java.
3763 * True for characters with general category "Cf" (format controls) as well as
3764 * non-whitespace ISO controls
3765 * (U+0000..U+0008, U+000E..U+001B, U+007F..U+009F).
3766 *
3767 * Same as java.lang.Character.isIdentifierIgnorable().
3768 *
3769 * Note that Unicode just recommends to ignore Cf (format controls).
3770 *
3771 * @param c the code point to be tested
3772 * @return TRUE if the code point is ignorable in identifiers according to Java
3773 *
3774 * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
3775 * @see u_isIDStart
3776 * @see u_isIDPart
3777 * @stable ICU 2.0
3778 */
3779U_STABLE UBool U_EXPORT2
3780u_isIDIgnorable(UChar32 c);
3781
3782/**
3783 * Determines if the specified character is permissible as the
3784 * first character in a Java identifier.
3785 * In addition to u_isIDStart(c), true for characters with
3786 * general categories "Sc" (currency symbols) and "Pc" (connecting punctuation).
3787 *
3788 * Same as java.lang.Character.isJavaIdentifierStart().
3789 *
3790 * @param c the code point to be tested
3791 * @return TRUE if the code point may start a Java identifier
3792 *
3793 * @see u_isJavaIDPart
3794 * @see u_isalpha
3795 * @see u_isIDStart
3796 * @stable ICU 2.0
3797 */
3798U_STABLE UBool U_EXPORT2
3799u_isJavaIDStart(UChar32 c);
3800
3801/**
3802 * Determines if the specified character is permissible
3803 * in a Java identifier.
3804 * In addition to u_isIDPart(c), true for characters with
3805 * general category "Sc" (currency symbols).
3806 *
3807 * Same as java.lang.Character.isJavaIdentifierPart().
3808 *
3809 * @param c the code point to be tested
3810 * @return TRUE if the code point may occur in a Java identifier
3811 *
3812 * @see u_isIDIgnorable
3813 * @see u_isJavaIDStart
3814 * @see u_isalpha
3815 * @see u_isdigit
3816 * @see u_isIDPart
3817 * @stable ICU 2.0
3818 */
3819U_STABLE UBool U_EXPORT2
3820u_isJavaIDPart(UChar32 c);
3821
3822/**
3823 * The given character is mapped to its lowercase equivalent according to
3824 * UnicodeData.txt; if the character has no lowercase equivalent, the character
3825 * itself is returned.
3826 *
3827 * Same as java.lang.Character.toLowerCase().
3828 *
3829 * This function only returns the simple, single-code point case mapping.
3830 * Full case mappings should be used whenever possible because they produce
3831 * better results by working on whole strings.
3832 * They take into account the string context and the language and can map
3833 * to a result string with a different length as appropriate.
3834 * Full case mappings are applied by the string case mapping functions,
3835 * see ustring.h and the UnicodeString class.
3836 * See also the User Guide chapter on C/POSIX migration:
3837 * http://icu-project.org/userguide/posix.html#case_mappings
3838 *
3839 * @param c the code point to be mapped
3840 * @return the Simple_Lowercase_Mapping of the code point, if any;
3841 * otherwise the code point itself.
3842 * @stable ICU 2.0
3843 */
3844U_STABLE UChar32 U_EXPORT2
3845u_tolower(UChar32 c);
3846
3847/**
3848 * The given character is mapped to its uppercase equivalent according to UnicodeData.txt;
3849 * if the character has no uppercase equivalent, the character itself is
3850 * returned.
3851 *
3852 * Same as java.lang.Character.toUpperCase().
3853 *
3854 * This function only returns the simple, single-code point case mapping.
3855 * Full case mappings should be used whenever possible because they produce
3856 * better results by working on whole strings.
3857 * They take into account the string context and the language and can map
3858 * to a result string with a different length as appropriate.
3859 * Full case mappings are applied by the string case mapping functions,
3860 * see ustring.h and the UnicodeString class.
3861 * See also the User Guide chapter on C/POSIX migration:
3862 * http://icu-project.org/userguide/posix.html#case_mappings
3863 *
3864 * @param c the code point to be mapped
3865 * @return the Simple_Uppercase_Mapping of the code point, if any;
3866 * otherwise the code point itself.
3867 * @stable ICU 2.0
3868 */
3869U_STABLE UChar32 U_EXPORT2
3870u_toupper(UChar32 c);
3871
3872/**
3873 * The given character is mapped to its titlecase equivalent
3874 * according to UnicodeData.txt;
3875 * if none is defined, the character itself is returned.
3876 *
3877 * Same as java.lang.Character.toTitleCase().
3878 *
3879 * This function only returns the simple, single-code point case mapping.
3880 * Full case mappings should be used whenever possible because they produce
3881 * better results by working on whole strings.
3882 * They take into account the string context and the language and can map
3883 * to a result string with a different length as appropriate.
3884 * Full case mappings are applied by the string case mapping functions,
3885 * see ustring.h and the UnicodeString class.
3886 * See also the User Guide chapter on C/POSIX migration:
3887 * http://icu-project.org/userguide/posix.html#case_mappings
3888 *
3889 * @param c the code point to be mapped
3890 * @return the Simple_Titlecase_Mapping of the code point, if any;
3891 * otherwise the code point itself.
3892 * @stable ICU 2.0
3893 */
3894U_STABLE UChar32 U_EXPORT2
3895u_totitle(UChar32 c);
3896
3897/**
3898 * The given character is mapped to its case folding equivalent according to
3899 * UnicodeData.txt and CaseFolding.txt;
3900 * if the character has no case folding equivalent, the character
3901 * itself is returned.
3902 *
3903 * This function only returns the simple, single-code point case mapping.
3904 * Full case mappings should be used whenever possible because they produce
3905 * better results by working on whole strings.
3906 * They take into account the string context and the language and can map
3907 * to a result string with a different length as appropriate.
3908 * Full case mappings are applied by the string case mapping functions,
3909 * see ustring.h and the UnicodeString class.
3910 * See also the User Guide chapter on C/POSIX migration:
3911 * http://icu-project.org/userguide/posix.html#case_mappings
3912 *
3913 * @param c the code point to be mapped
3914 * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I
3915 * @return the Simple_Case_Folding of the code point, if any;
3916 * otherwise the code point itself.
3917 * @stable ICU 2.0
3918 */
3919U_STABLE UChar32 U_EXPORT2
3920u_foldCase(UChar32 c, uint32_t options);
3921
3922/**
3923 * Returns the decimal digit value of the code point in the
3924 * specified radix.
3925 *
3926 * If the radix is not in the range <code>2<=radix<=36</code> or if the
3927 * value of <code>c</code> is not a valid digit in the specified
3928 * radix, <code>-1</code> is returned. A character is a valid digit
3929 * if at least one of the following is true:
3930 * <ul>
3931 * <li>The character has a decimal digit value.
3932 * Such characters have the general category "Nd" (decimal digit numbers)
3933 * and a Numeric_Type of Decimal.
3934 * In this case the value is the character's decimal digit value.</li>
3935 * <li>The character is one of the uppercase Latin letters
3936 * <code>'A'</code> through <code>'Z'</code>.
3937 * In this case the value is <code>c-'A'+10</code>.</li>
3938 * <li>The character is one of the lowercase Latin letters
3939 * <code>'a'</code> through <code>'z'</code>.
3940 * In this case the value is <code>ch-'a'+10</code>.</li>
3941 * <li>Latin letters from both the ASCII range (0061..007A, 0041..005A)
3942 * as well as from the Fullwidth ASCII range (FF41..FF5A, FF21..FF3A)
3943 * are recognized.</li>
3944 * </ul>
3945 *
3946 * Same as java.lang.Character.digit().
3947 *
3948 * @param ch the code point to be tested.
3949 * @param radix the radix.
3950 * @return the numeric value represented by the character in the
3951 * specified radix,
3952 * or -1 if there is no value or if the value exceeds the radix.
3953 *
3954 * @see UCHAR_NUMERIC_TYPE
3955 * @see u_forDigit
3956 * @see u_charDigitValue
3957 * @see u_isdigit
3958 * @stable ICU 2.0
3959 */
3960U_STABLE int32_t U_EXPORT2
3961u_digit(UChar32 ch, int8_t radix);
3962
3963/**
3964 * Determines the character representation for a specific digit in
3965 * the specified radix. If the value of <code>radix</code> is not a
3966 * valid radix, or the value of <code>digit</code> is not a valid
3967 * digit in the specified radix, the null character
3968 * (<code>U+0000</code>) is returned.
3969 * <p>
3970 * The <code>radix</code> argument is valid if it is greater than or
3971 * equal to 2 and less than or equal to 36.
3972 * The <code>digit</code> argument is valid if
3973 * <code>0 <= digit < radix</code>.
3974 * <p>
3975 * If the digit is less than 10, then
3976 * <code>'0' + digit</code> is returned. Otherwise, the value
3977 * <code>'a' + digit - 10</code> is returned.
3978 *
3979 * Same as java.lang.Character.forDigit().
3980 *
3981 * @param digit the number to convert to a character.
3982 * @param radix the radix.
3983 * @return the <code>char</code> representation of the specified digit
3984 * in the specified radix.
3985 *
3986 * @see u_digit
3987 * @see u_charDigitValue
3988 * @see u_isdigit
3989 * @stable ICU 2.0
3990 */
3991U_STABLE UChar32 U_EXPORT2
3992u_forDigit(int32_t digit, int8_t radix);
3993
3994/**
3995 * Get the "age" of the code point.
3996 * The "age" is the Unicode version when the code point was first
3997 * designated (as a non-character or for Private Use)
3998 * or assigned a character.
3999 * This can be useful to avoid emitting code points to receiving
4000 * processes that do not accept newer characters.
4001 * The data is from the UCD file DerivedAge.txt.
4002 *
4003 * @param c The code point.
4004 * @param versionArray The Unicode version number array, to be filled in.
4005 *
4006 * @stable ICU 2.1
4007 */
4008U_STABLE void U_EXPORT2
4009u_charAge(UChar32 c, UVersionInfo versionArray);
4010
4011/**
4012 * Gets the Unicode version information.
4013 * The version array is filled in with the version information
4014 * for the Unicode standard that is currently used by ICU.
4015 * For example, Unicode version 3.1.1 is represented as an array with
4016 * the values { 3, 1, 1, 0 }.
4017 *
4018 * @param versionArray an output array that will be filled in with
4019 * the Unicode version number
4020 * @stable ICU 2.0
4021 */
4022U_STABLE void U_EXPORT2
4023u_getUnicodeVersion(UVersionInfo versionArray);
4024
4025#if !UCONFIG_NO_NORMALIZATION
4026/**
4027 * Get the FC_NFKC_Closure property string for a character.
4028 * See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure"
4029 * or for "FNC": http://www.unicode.org/reports/tr15/
4030 *
4031 * @param c The character (code point) for which to get the FC_NFKC_Closure string.
4032 * It must be <code>0<=c<=0x10ffff</code>.
4033 * @param dest Destination address for copying the string.
4034 * The string will be zero-terminated if possible.
4035 * If there is no FC_NFKC_Closure string,
4036 * then the buffer will be set to the empty string.
4037 * @param destCapacity <code>==sizeof(dest)</code>
4038 * @param pErrorCode Pointer to a UErrorCode variable.
4039 * @return The length of the string, or 0 if there is no FC_NFKC_Closure string for this character.
4040 * If the destCapacity is less than or equal to the length, then the buffer
4041 * contains the truncated name and the returned length indicates the full
4042 * length of the name.
4043 * The length does not include the zero-termination.
4044 *
4045 * @stable ICU 2.2
4046 */
4047U_STABLE int32_t U_EXPORT2
4048u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode);
4049
4050#endif
4051
4052
4053U_CDECL_END
4054
4055#endif /*_UCHAR*/
4056/*eof*/
4057