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

source code of include/unicode/uchar.h