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