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