]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /* |
2 | ********************************************************************** | |
73c04bcf | 3 | * Copyright (C) 1997-2006, International Business Machines |
b75a7d8f A |
4 | * Corporation and others. All Rights Reserved. |
5 | ********************************************************************** | |
6 | * | |
7 | * File UCHAR.H | |
8 | * | |
9 | * Modification History: | |
10 | * | |
11 | * Date Name Description | |
12 | * 04/02/97 aliu Creation. | |
13 | * 03/29/99 helena Updated for C APIs. | |
14 | * 4/15/99 Madhu Updated for C Implementation and Javadoc | |
15 | * 5/20/99 Madhu Added the function u_getVersion() | |
16 | * 8/19/1999 srl Upgraded scripts to Unicode 3.0 | |
17 | * 8/27/1999 schererm UCharDirection constants: U_... | |
18 | * 11/11/1999 weiv added u_isalnum(), cleaned comments | |
19 | * 01/11/2000 helena Renamed u_getVersion to u_getUnicodeVersion(). | |
20 | ****************************************************************************** | |
21 | */ | |
22 | ||
23 | #ifndef UCHAR_H | |
24 | #define UCHAR_H | |
25 | ||
26 | #include "unicode/utypes.h" | |
27 | ||
28 | U_CDECL_BEGIN | |
29 | ||
30 | /*==========================================================================*/ | |
31 | /* Unicode version number */ | |
32 | /*==========================================================================*/ | |
33 | /** | |
34 | * Unicode version number, default for the current ICU version. | |
35 | * The actual Unicode Character Database (UCD) data is stored in uprops.dat | |
36 | * and may be generated from UCD files from a different Unicode version. | |
37 | * Call u_getUnicodeVersion to get the actual Unicode version of the data. | |
38 | * | |
39 | * @see u_getUnicodeVersion | |
40 | * @stable ICU 2.0 | |
41 | */ | |
73c04bcf | 42 | #define U_UNICODE_VERSION "5.0" |
b75a7d8f A |
43 | |
44 | /** | |
45 | * \file | |
46 | * \brief C API: Unicode Properties | |
47 | * | |
48 | * This C API provides low-level access to the Unicode Character Database. | |
49 | * In addition to raw property values, some convenience functions calculate | |
50 | * derived properties, for example for Java-style programming. | |
51 | * | |
52 | * Unicode assigns each code point (not just assigned character) values for | |
53 | * many properties. | |
54 | * Most of them are simple boolean flags, or constants from a small enumerated list. | |
55 | * For some properties, values are strings or other relatively more complex types. | |
56 | * | |
57 | * For more information see | |
58 | * "About the Unicode Character Database" (http://www.unicode.org/ucd/) | |
73c04bcf | 59 | * and the ICU User Guide chapter on Properties (http://icu.sourceforge.net/userguide/properties.html). |
b75a7d8f A |
60 | * |
61 | * Many functions are designed to match java.lang.Character functions. | |
62 | * See the individual function documentation, | |
73c04bcf A |
63 | * and see the JDK 1.4 java.lang.Character documentation |
64 | * at http://java.sun.com/j2se/1.4/docs/api/java/lang/Character.html | |
b75a7d8f A |
65 | * |
66 | * There are also functions that provide easy migration from C/POSIX functions | |
67 | * like isblank(). Their use is generally discouraged because the C/POSIX | |
68 | * standards do not define their semantics beyond the ASCII range, which means | |
69 | * that different implementations exhibit very different behavior. | |
70 | * Instead, Unicode properties should be used directly. | |
71 | * | |
72 | * There are also only a few, broad C/POSIX character classes, and they tend | |
73 | * to be used for conflicting purposes. For example, the "isalpha()" class | |
74 | * is sometimes used to determine word boundaries, while a more sophisticated | |
75 | * approach would at least distinguish initial letters from continuation | |
76 | * characters (the latter including combining marks). | |
77 | * (In ICU, BreakIterator is the most sophisticated API for word boundaries.) | |
78 | * Another example: There is no "istitle()" class for titlecase characters. | |
79 | * | |
73c04bcf A |
80 | * ICU 3.4 and later provides API access for all twelve C/POSIX character classes. |
81 | * ICU implements them according to the Standard Recommendations in | |
82 | * Annex C: Compatibility Properties of UTS #18 Unicode Regular Expressions | |
83 | * (http://www.unicode.org/reports/tr18/#Compatibility_Properties). | |
84 | * | |
85 | * API access for C/POSIX character classes is as follows: | |
86 | * - alpha: u_isUAlphabetic(c) or u_hasBinaryProperty(c, UCHAR_ALPHABETIC) | |
87 | * - lower: u_isULowercase(c) or u_hasBinaryProperty(c, UCHAR_LOWERCASE) | |
88 | * - upper: u_isUUppercase(c) or u_hasBinaryProperty(c, UCHAR_UPPERCASE) | |
89 | * - punct: u_ispunct(c) | |
90 | * - digit: u_isdigit(c) or u_charType(c)==U_DECIMAL_DIGIT_NUMBER | |
91 | * - xdigit: u_isxdigit(c) or u_hasBinaryProperty(c, UCHAR_POSIX_XDIGIT) | |
92 | * - alnum: u_hasBinaryProperty(c, UCHAR_POSIX_ALNUM) | |
93 | * - space: u_isUWhiteSpace(c) or u_hasBinaryProperty(c, UCHAR_WHITE_SPACE) | |
94 | * - blank: u_isblank(c) or u_hasBinaryProperty(c, UCHAR_POSIX_BLANK) | |
95 | * - cntrl: u_charType(c)==U_CONTROL_CHAR | |
96 | * - graph: u_hasBinaryProperty(c, UCHAR_POSIX_GRAPH) | |
97 | * - print: u_hasBinaryProperty(c, UCHAR_POSIX_PRINT) | |
98 | * | |
99 | * Note: Some of the u_isxyz() functions in uchar.h predate, and do not match, | |
100 | * the Standard Recommendations in UTS #18. Instead, they match Java | |
101 | * functions according to their API documentation. | |
102 | * | |
103 | * \htmlonly | |
104 | * The C/POSIX character classes are also available in UnicodeSet patterns, | |
105 | * using patterns like [:graph:] or \p{graph}. | |
106 | * \endhtmlonly | |
b75a7d8f A |
107 | * |
108 | * Note: There are several ICU whitespace functions. | |
109 | * Comparison: | |
110 | * - u_isUWhiteSpace=UCHAR_WHITE_SPACE: Unicode White_Space property; | |
111 | * most of general categories "Z" (separators) + most whitespace ISO controls | |
112 | * (including no-break spaces, but excluding IS1..IS4 and ZWSP) | |
113 | * - u_isWhitespace: Java isWhitespace; Z + whitespace ISO controls but excluding no-break spaces | |
114 | * - u_isJavaSpaceChar: Java isSpaceChar; just Z (including no-break spaces) | |
115 | * - u_isspace: Z + whitespace ISO controls (including no-break spaces) | |
116 | * - u_isblank: "horizontal spaces" = TAB + Zs - ZWSP | |
117 | */ | |
118 | ||
119 | /** | |
120 | * Constants. | |
121 | */ | |
122 | ||
123 | /** The lowest Unicode code point value. Code points are non-negative. @stable ICU 2.0 */ | |
124 | #define UCHAR_MIN_VALUE 0 | |
125 | ||
126 | /** | |
127 | * The highest Unicode code point value (scalar value) according to | |
128 | * The Unicode Standard. This is a 21-bit value (20.1 bits, rounded up). | |
129 | * For a single character, UChar32 is a simple type that can hold any code point value. | |
130 | * | |
131 | * @see UChar32 | |
132 | * @stable ICU 2.0 | |
133 | */ | |
134 | #define UCHAR_MAX_VALUE 0x10ffff | |
135 | ||
136 | /** | |
137 | * Get a single-bit bit set (a flag) from a bit number 0..31. | |
138 | * @stable ICU 2.1 | |
139 | */ | |
140 | #define U_MASK(x) ((uint32_t)1<<(x)) | |
141 | ||
142 | /* | |
143 | * !! Note: Several comments in this file are machine-read by the | |
144 | * genpname tool. These comments describe the correspondence between | |
145 | * icu enum constants and UCD entities. Do not delete them. Update | |
146 | * these comments as needed. | |
147 | * | |
148 | * Any comment of the form "/ *[name]* /" (spaces added) is such | |
149 | * a comment. | |
150 | * | |
151 | * The U_JG_* and U_GC_*_MASK constants are matched by their symbolic | |
152 | * name, which must match PropertyValueAliases.txt. | |
153 | */ | |
154 | ||
155 | /** | |
156 | * Selection constants for Unicode properties. | |
157 | * These constants are used in functions like u_hasBinaryProperty to select | |
158 | * one of the Unicode properties. | |
159 | * | |
160 | * The properties APIs are intended to reflect Unicode properties as defined | |
161 | * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). | |
162 | * For details about the properties see http://www.unicode.org/ucd/ . | |
163 | * For names of Unicode properties see the UCD file PropertyAliases.txt. | |
164 | * | |
165 | * Important: If ICU is built with UCD files from Unicode versions below, e.g., 3.2, | |
166 | * then properties marked with "new in Unicode 3.2" are not or not fully available. | |
167 | * Check u_getUnicodeVersion to be sure. | |
168 | * | |
169 | * @see u_hasBinaryProperty | |
170 | * @see u_getIntPropertyValue | |
171 | * @see u_getUnicodeVersion | |
172 | * @stable ICU 2.1 | |
173 | */ | |
174 | typedef enum UProperty { | |
175 | /* See note !!. Comments of the form "Binary property Dash", | |
176 | "Enumerated property Script", "Double property Numeric_Value", | |
177 | and "String property Age" are read by genpname. */ | |
178 | ||
179 | /* Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that | |
374ca955 A |
180 | debuggers display UCHAR_ALPHABETIC as the symbolic name for 0, |
181 | rather than UCHAR_BINARY_START. Likewise for other *_START | |
182 | identifiers. */ | |
b75a7d8f A |
183 | |
184 | /** Binary property Alphabetic. Same as u_isUAlphabetic, different from u_isalpha. | |
185 | Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic @stable ICU 2.1 */ | |
186 | UCHAR_ALPHABETIC=0, | |
187 | /** First constant for binary Unicode properties. @stable ICU 2.1 */ | |
188 | UCHAR_BINARY_START=UCHAR_ALPHABETIC, | |
189 | /** Binary property ASCII_Hex_Digit. 0-9 A-F a-f @stable ICU 2.1 */ | |
73c04bcf | 190 | UCHAR_ASCII_HEX_DIGIT=1, |
b75a7d8f A |
191 | /** Binary property Bidi_Control. |
192 | Format controls which have specific functions | |
193 | in the Bidi Algorithm. @stable ICU 2.1 */ | |
73c04bcf | 194 | UCHAR_BIDI_CONTROL=2, |
b75a7d8f A |
195 | /** Binary property Bidi_Mirrored. |
196 | Characters that may change display in RTL text. | |
197 | Same as u_isMirrored. | |
198 | See Bidi Algorithm, UTR 9. @stable ICU 2.1 */ | |
73c04bcf | 199 | UCHAR_BIDI_MIRRORED=3, |
b75a7d8f | 200 | /** Binary property Dash. Variations of dashes. @stable ICU 2.1 */ |
73c04bcf | 201 | UCHAR_DASH=4, |
b75a7d8f A |
202 | /** Binary property Default_Ignorable_Code_Point (new in Unicode 3.2). |
203 | Ignorable in most processing. | |
204 | <2060..206F, FFF0..FFFB, E0000..E0FFF>+Other_Default_Ignorable_Code_Point+(Cf+Cc+Cs-White_Space) @stable ICU 2.1 */ | |
73c04bcf | 205 | UCHAR_DEFAULT_IGNORABLE_CODE_POINT=5, |
b75a7d8f A |
206 | /** Binary property Deprecated (new in Unicode 3.2). |
207 | The usage of deprecated characters is strongly discouraged. @stable ICU 2.1 */ | |
73c04bcf | 208 | UCHAR_DEPRECATED=6, |
b75a7d8f A |
209 | /** Binary property Diacritic. Characters that linguistically modify |
210 | the meaning of another character to which they apply. @stable ICU 2.1 */ | |
73c04bcf | 211 | UCHAR_DIACRITIC=7, |
b75a7d8f A |
212 | /** Binary property Extender. |
213 | Extend the value or shape of a preceding alphabetic character, | |
214 | e.g., length and iteration marks. @stable ICU 2.1 */ | |
73c04bcf | 215 | UCHAR_EXTENDER=8, |
b75a7d8f A |
216 | /** Binary property Full_Composition_Exclusion. |
217 | CompositionExclusions.txt+Singleton Decompositions+ | |
218 | Non-Starter Decompositions. @stable ICU 2.1 */ | |
73c04bcf | 219 | UCHAR_FULL_COMPOSITION_EXCLUSION=9, |
b75a7d8f A |
220 | /** Binary property Grapheme_Base (new in Unicode 3.2). |
221 | For programmatic determination of grapheme cluster boundaries. | |
222 | [0..10FFFF]-Cc-Cf-Cs-Co-Cn-Zl-Zp-Grapheme_Link-Grapheme_Extend-CGJ @stable ICU 2.1 */ | |
73c04bcf | 223 | UCHAR_GRAPHEME_BASE=10, |
b75a7d8f A |
224 | /** Binary property Grapheme_Extend (new in Unicode 3.2). |
225 | For programmatic determination of grapheme cluster boundaries. | |
226 | Me+Mn+Mc+Other_Grapheme_Extend-Grapheme_Link-CGJ @stable ICU 2.1 */ | |
73c04bcf | 227 | UCHAR_GRAPHEME_EXTEND=11, |
b75a7d8f A |
228 | /** Binary property Grapheme_Link (new in Unicode 3.2). |
229 | For programmatic determination of grapheme cluster boundaries. @stable ICU 2.1 */ | |
73c04bcf | 230 | UCHAR_GRAPHEME_LINK=12, |
b75a7d8f A |
231 | /** Binary property Hex_Digit. |
232 | Characters commonly used for hexadecimal numbers. @stable ICU 2.1 */ | |
73c04bcf | 233 | UCHAR_HEX_DIGIT=13, |
b75a7d8f A |
234 | /** Binary property Hyphen. Dashes used to mark connections |
235 | between pieces of words, plus the Katakana middle dot. @stable ICU 2.1 */ | |
73c04bcf | 236 | UCHAR_HYPHEN=14, |
b75a7d8f A |
237 | /** Binary property ID_Continue. |
238 | Characters that can continue an identifier. | |
239 | DerivedCoreProperties.txt also says "NOTE: Cf characters should be filtered out." | |
240 | ID_Start+Mn+Mc+Nd+Pc @stable ICU 2.1 */ | |
73c04bcf | 241 | UCHAR_ID_CONTINUE=15, |
b75a7d8f A |
242 | /** Binary property ID_Start. |
243 | Characters that can start an identifier. | |
244 | Lu+Ll+Lt+Lm+Lo+Nl @stable ICU 2.1 */ | |
73c04bcf | 245 | UCHAR_ID_START=16, |
b75a7d8f A |
246 | /** Binary property Ideographic. |
247 | CJKV ideographs. @stable ICU 2.1 */ | |
73c04bcf | 248 | UCHAR_IDEOGRAPHIC=17, |
b75a7d8f A |
249 | /** Binary property IDS_Binary_Operator (new in Unicode 3.2). |
250 | For programmatic determination of | |
251 | Ideographic Description Sequences. @stable ICU 2.1 */ | |
73c04bcf | 252 | UCHAR_IDS_BINARY_OPERATOR=18, |
b75a7d8f A |
253 | /** Binary property IDS_Trinary_Operator (new in Unicode 3.2). |
254 | For programmatic determination of | |
255 | Ideographic Description Sequences. @stable ICU 2.1 */ | |
73c04bcf | 256 | UCHAR_IDS_TRINARY_OPERATOR=19, |
b75a7d8f A |
257 | /** Binary property Join_Control. |
258 | Format controls for cursive joining and ligation. @stable ICU 2.1 */ | |
73c04bcf | 259 | UCHAR_JOIN_CONTROL=20, |
b75a7d8f A |
260 | /** Binary property Logical_Order_Exception (new in Unicode 3.2). |
261 | Characters that do not use logical order and | |
262 | require special handling in most processing. @stable ICU 2.1 */ | |
73c04bcf | 263 | UCHAR_LOGICAL_ORDER_EXCEPTION=21, |
b75a7d8f A |
264 | /** Binary property Lowercase. Same as u_isULowercase, different from u_islower. |
265 | Ll+Other_Lowercase @stable ICU 2.1 */ | |
73c04bcf | 266 | UCHAR_LOWERCASE=22, |
b75a7d8f | 267 | /** Binary property Math. Sm+Other_Math @stable ICU 2.1 */ |
73c04bcf | 268 | UCHAR_MATH=23, |
b75a7d8f A |
269 | /** Binary property Noncharacter_Code_Point. |
270 | Code points that are explicitly defined as illegal | |
271 | for the encoding of characters. @stable ICU 2.1 */ | |
73c04bcf | 272 | UCHAR_NONCHARACTER_CODE_POINT=24, |
b75a7d8f | 273 | /** Binary property Quotation_Mark. @stable ICU 2.1 */ |
73c04bcf | 274 | UCHAR_QUOTATION_MARK=25, |
b75a7d8f A |
275 | /** Binary property Radical (new in Unicode 3.2). |
276 | For programmatic determination of | |
277 | Ideographic Description Sequences. @stable ICU 2.1 */ | |
73c04bcf | 278 | UCHAR_RADICAL=26, |
b75a7d8f A |
279 | /** Binary property Soft_Dotted (new in Unicode 3.2). |
280 | Characters with a "soft dot", like i or j. | |
281 | An accent placed on these characters causes | |
282 | the dot to disappear. @stable ICU 2.1 */ | |
73c04bcf | 283 | UCHAR_SOFT_DOTTED=27, |
b75a7d8f A |
284 | /** Binary property Terminal_Punctuation. |
285 | Punctuation characters that generally mark | |
286 | the end of textual units. @stable ICU 2.1 */ | |
73c04bcf | 287 | UCHAR_TERMINAL_PUNCTUATION=28, |
b75a7d8f A |
288 | /** Binary property Unified_Ideograph (new in Unicode 3.2). |
289 | For programmatic determination of | |
290 | Ideographic Description Sequences. @stable ICU 2.1 */ | |
73c04bcf | 291 | UCHAR_UNIFIED_IDEOGRAPH=29, |
b75a7d8f A |
292 | /** Binary property Uppercase. Same as u_isUUppercase, different from u_isupper. |
293 | Lu+Other_Uppercase @stable ICU 2.1 */ | |
73c04bcf | 294 | UCHAR_UPPERCASE=30, |
b75a7d8f A |
295 | /** Binary property White_Space. |
296 | Same as u_isUWhiteSpace, different from u_isspace and u_isWhitespace. | |
297 | Space characters+TAB+CR+LF-ZWSP-ZWNBSP @stable ICU 2.1 */ | |
73c04bcf | 298 | UCHAR_WHITE_SPACE=31, |
b75a7d8f A |
299 | /** Binary property XID_Continue. |
300 | ID_Continue modified to allow closure under | |
301 | normalization forms NFKC and NFKD. @stable ICU 2.1 */ | |
73c04bcf | 302 | UCHAR_XID_CONTINUE=32, |
b75a7d8f A |
303 | /** Binary property XID_Start. ID_Start modified to allow |
304 | closure under normalization forms NFKC and NFKD. @stable ICU 2.1 */ | |
73c04bcf | 305 | UCHAR_XID_START=33, |
b75a7d8f A |
306 | /** Binary property Case_Sensitive. Either the source of a case |
307 | mapping or _in_ the target of a case mapping. Not the same as | |
374ca955 | 308 | the general category Cased_Letter. @stable ICU 2.6 */ |
73c04bcf | 309 | UCHAR_CASE_SENSITIVE=34, |
374ca955 A |
310 | /** Binary property STerm (new in Unicode 4.0.1). |
311 | Sentence Terminal. Used in UAX #29: Text Boundaries | |
312 | (http://www.unicode.org/reports/tr29/) | |
73c04bcf A |
313 | @stable ICU 3.0 */ |
314 | UCHAR_S_TERM=35, | |
374ca955 A |
315 | /** Binary property Variation_Selector (new in Unicode 4.0.1). |
316 | Indicates all those characters that qualify as Variation Selectors. | |
317 | For details on the behavior of these characters, | |
318 | see StandardizedVariants.html and 15.6 Variation Selectors. | |
73c04bcf A |
319 | @stable ICU 3.0 */ |
320 | UCHAR_VARIATION_SELECTOR=36, | |
374ca955 A |
321 | /** Binary property NFD_Inert. |
322 | ICU-specific property for characters that are inert under NFD, | |
323 | i.e., they do not interact with adjacent characters. | |
324 | Used for example in normalizing transforms in incremental mode | |
325 | to find the boundary of safely normalizable text despite possible | |
326 | text additions. | |
327 | ||
328 | There is one such property per normalization form. | |
329 | These properties are computed as follows - an inert character is: | |
330 | a) unassigned, or ALL of the following: | |
331 | b) of combining class 0. | |
332 | c) not decomposed by this normalization form. | |
333 | AND if NFC or NFKC, | |
334 | d) can never compose with a previous character. | |
335 | e) can never compose with a following character. | |
336 | f) can never change if another character is added. | |
337 | Example: a-breve might satisfy all but f, but if you | |
338 | add an ogonek it changes to a-ogonek + breve | |
339 | ||
340 | See also com.ibm.text.UCD.NFSkippable in the ICU4J repository, | |
341 | and icu/source/common/unormimp.h . | |
73c04bcf A |
342 | @stable ICU 3.0 */ |
343 | UCHAR_NFD_INERT=37, | |
374ca955 A |
344 | /** Binary property NFKD_Inert. |
345 | ICU-specific property for characters that are inert under NFKD, | |
346 | i.e., they do not interact with adjacent characters. | |
347 | Used for example in normalizing transforms in incremental mode | |
348 | to find the boundary of safely normalizable text despite possible | |
349 | text additions. | |
350 | @see UCHAR_NFD_INERT | |
73c04bcf A |
351 | @stable ICU 3.0 */ |
352 | UCHAR_NFKD_INERT=38, | |
374ca955 A |
353 | /** Binary property NFC_Inert. |
354 | ICU-specific property for characters that are inert under NFC, | |
355 | i.e., they do not interact with adjacent characters. | |
356 | Used for example in normalizing transforms in incremental mode | |
357 | to find the boundary of safely normalizable text despite possible | |
358 | text additions. | |
359 | @see UCHAR_NFD_INERT | |
73c04bcf A |
360 | @stable ICU 3.0 */ |
361 | UCHAR_NFC_INERT=39, | |
374ca955 A |
362 | /** Binary property NFKC_Inert. |
363 | ICU-specific property for characters that are inert under NFKC, | |
364 | i.e., they do not interact with adjacent characters. | |
365 | Used for example in normalizing transforms in incremental mode | |
366 | to find the boundary of safely normalizable text despite possible | |
367 | text additions. | |
368 | @see UCHAR_NFD_INERT | |
73c04bcf A |
369 | @stable ICU 3.0 */ |
370 | UCHAR_NFKC_INERT=40, | |
374ca955 A |
371 | /** Binary Property Segment_Starter. |
372 | ICU-specific property for characters that are starters in terms of | |
373 | Unicode normalization and combining character sequences. | |
374 | They have ccc=0 and do not occur in non-initial position of the | |
375 | canonical decomposition of any character | |
376 | (like " in NFD(a-umlaut) and a Jamo T in an NFD(Hangul LVT)). | |
377 | ICU uses this property for segmenting a string for generating a set of | |
378 | canonically equivalent strings, e.g. for canonical closure while | |
379 | processing collation tailoring rules. | |
73c04bcf A |
380 | @stable ICU 3.0 */ |
381 | UCHAR_SEGMENT_STARTER=41, | |
382 | #ifndef U_HIDE_DRAFT_API | |
383 | /** Binary property Pattern_Syntax (new in Unicode 4.1). | |
384 | See UAX #31 Identifier and Pattern Syntax | |
385 | (http://www.unicode.org/reports/tr31/) | |
386 | @draft ICU 3.4 */ | |
387 | UCHAR_PATTERN_SYNTAX=42, | |
388 | /** Binary property Pattern_White_Space (new in Unicode 4.1). | |
389 | See UAX #31 Identifier and Pattern Syntax | |
390 | (http://www.unicode.org/reports/tr31/) | |
391 | @draft ICU 3.4 */ | |
392 | UCHAR_PATTERN_WHITE_SPACE=43, | |
393 | /** Binary property alnum (a C/POSIX character class). | |
394 | Implemented according to the UTS #18 Annex C Standard Recommendation. | |
395 | See the uchar.h file documentation. | |
396 | @draft ICU 3.4 */ | |
397 | UCHAR_POSIX_ALNUM=44, | |
398 | /** Binary property blank (a C/POSIX character class). | |
399 | Implemented according to the UTS #18 Annex C Standard Recommendation. | |
400 | See the uchar.h file documentation. | |
401 | @draft ICU 3.4 */ | |
402 | UCHAR_POSIX_BLANK=45, | |
403 | /** Binary property graph (a C/POSIX character class). | |
404 | Implemented according to the UTS #18 Annex C Standard Recommendation. | |
405 | See the uchar.h file documentation. | |
406 | @draft ICU 3.4 */ | |
407 | UCHAR_POSIX_GRAPH=46, | |
408 | /** Binary property print (a C/POSIX character class). | |
409 | Implemented according to the UTS #18 Annex C Standard Recommendation. | |
410 | See the uchar.h file documentation. | |
411 | @draft ICU 3.4 */ | |
412 | UCHAR_POSIX_PRINT=47, | |
413 | /** Binary property xdigit (a C/POSIX character class). | |
414 | Implemented according to the UTS #18 Annex C Standard Recommendation. | |
415 | See the uchar.h file documentation. | |
416 | @draft ICU 3.4 */ | |
417 | UCHAR_POSIX_XDIGIT=48, | |
418 | #endif /* U_HIDE_DRAFT_API */ | |
b75a7d8f | 419 | /** One more than the last constant for binary Unicode properties. @stable ICU 2.1 */ |
73c04bcf | 420 | UCHAR_BINARY_LIMIT=49, |
b75a7d8f A |
421 | |
422 | /** Enumerated property Bidi_Class. | |
374ca955 | 423 | Same as u_charDirection, returns UCharDirection values. @stable ICU 2.2 */ |
b75a7d8f | 424 | UCHAR_BIDI_CLASS=0x1000, |
374ca955 | 425 | /** First constant for enumerated/integer Unicode properties. @stable ICU 2.2 */ |
b75a7d8f A |
426 | UCHAR_INT_START=UCHAR_BIDI_CLASS, |
427 | /** Enumerated property Block. | |
374ca955 | 428 | Same as ublock_getCode, returns UBlockCode values. @stable ICU 2.2 */ |
73c04bcf | 429 | UCHAR_BLOCK=0x1001, |
b75a7d8f | 430 | /** Enumerated property Canonical_Combining_Class. |
374ca955 | 431 | Same as u_getCombiningClass, returns 8-bit numeric values. @stable ICU 2.2 */ |
73c04bcf | 432 | UCHAR_CANONICAL_COMBINING_CLASS=0x1002, |
b75a7d8f | 433 | /** Enumerated property Decomposition_Type. |
374ca955 | 434 | Returns UDecompositionType values. @stable ICU 2.2 */ |
73c04bcf | 435 | UCHAR_DECOMPOSITION_TYPE=0x1003, |
b75a7d8f A |
436 | /** Enumerated property East_Asian_Width. |
437 | See http://www.unicode.org/reports/tr11/ | |
374ca955 | 438 | Returns UEastAsianWidth values. @stable ICU 2.2 */ |
73c04bcf | 439 | UCHAR_EAST_ASIAN_WIDTH=0x1004, |
b75a7d8f | 440 | /** Enumerated property General_Category. |
374ca955 | 441 | Same as u_charType, returns UCharCategory values. @stable ICU 2.2 */ |
73c04bcf | 442 | UCHAR_GENERAL_CATEGORY=0x1005, |
b75a7d8f | 443 | /** Enumerated property Joining_Group. |
374ca955 | 444 | Returns UJoiningGroup values. @stable ICU 2.2 */ |
73c04bcf | 445 | UCHAR_JOINING_GROUP=0x1006, |
b75a7d8f | 446 | /** Enumerated property Joining_Type. |
374ca955 | 447 | Returns UJoiningType values. @stable ICU 2.2 */ |
73c04bcf | 448 | UCHAR_JOINING_TYPE=0x1007, |
b75a7d8f | 449 | /** Enumerated property Line_Break. |
374ca955 | 450 | Returns ULineBreak values. @stable ICU 2.2 */ |
73c04bcf | 451 | UCHAR_LINE_BREAK=0x1008, |
b75a7d8f | 452 | /** Enumerated property Numeric_Type. |
374ca955 | 453 | Returns UNumericType values. @stable ICU 2.2 */ |
73c04bcf | 454 | UCHAR_NUMERIC_TYPE=0x1009, |
b75a7d8f | 455 | /** Enumerated property Script. |
374ca955 | 456 | Same as uscript_getScript, returns UScriptCode values. @stable ICU 2.2 */ |
73c04bcf | 457 | UCHAR_SCRIPT=0x100A, |
b75a7d8f | 458 | /** Enumerated property Hangul_Syllable_Type, new in Unicode 4. |
374ca955 | 459 | Returns UHangulSyllableType values. @stable ICU 2.6 */ |
73c04bcf | 460 | UCHAR_HANGUL_SYLLABLE_TYPE=0x100B, |
374ca955 | 461 | /** Enumerated property NFD_Quick_Check. |
73c04bcf A |
462 | Returns UNormalizationCheckResult values. @stable ICU 3.0 */ |
463 | UCHAR_NFD_QUICK_CHECK=0x100C, | |
374ca955 | 464 | /** Enumerated property NFKD_Quick_Check. |
73c04bcf A |
465 | Returns UNormalizationCheckResult values. @stable ICU 3.0 */ |
466 | UCHAR_NFKD_QUICK_CHECK=0x100D, | |
374ca955 | 467 | /** Enumerated property NFC_Quick_Check. |
73c04bcf A |
468 | Returns UNormalizationCheckResult values. @stable ICU 3.0 */ |
469 | UCHAR_NFC_QUICK_CHECK=0x100E, | |
374ca955 | 470 | /** Enumerated property NFKC_Quick_Check. |
73c04bcf A |
471 | Returns UNormalizationCheckResult values. @stable ICU 3.0 */ |
472 | UCHAR_NFKC_QUICK_CHECK=0x100F, | |
374ca955 A |
473 | /** Enumerated property Lead_Canonical_Combining_Class. |
474 | ICU-specific property for the ccc of the first code point | |
475 | of the decomposition, or lccc(c)=ccc(NFD(c)[0]). | |
476 | Useful for checking for canonically ordered text; | |
477 | see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD . | |
73c04bcf A |
478 | Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */ |
479 | UCHAR_LEAD_CANONICAL_COMBINING_CLASS=0x1010, | |
374ca955 A |
480 | /** Enumerated property Trail_Canonical_Combining_Class. |
481 | ICU-specific property for the ccc of the last code point | |
482 | of the decomposition, or tccc(c)=ccc(NFD(c)[last]). | |
483 | Useful for checking for canonically ordered text; | |
484 | see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD . | |
73c04bcf A |
485 | Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */ |
486 | UCHAR_TRAIL_CANONICAL_COMBINING_CLASS=0x1011, | |
487 | #ifndef U_HIDE_DRAFT_API | |
488 | /** Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1). | |
489 | Used in UAX #29: Text Boundaries | |
490 | (http://www.unicode.org/reports/tr29/) | |
491 | Returns UGraphemeClusterBreak values. @draft ICU 3.4 */ | |
492 | UCHAR_GRAPHEME_CLUSTER_BREAK=0x1012, | |
493 | /** Enumerated property Sentence_Break (new in Unicode 4.1). | |
494 | Used in UAX #29: Text Boundaries | |
495 | (http://www.unicode.org/reports/tr29/) | |
496 | Returns USentenceBreak values. @draft ICU 3.4 */ | |
497 | UCHAR_SENTENCE_BREAK=0x1013, | |
498 | /** Enumerated property Word_Break (new in Unicode 4.1). | |
499 | Used in UAX #29: Text Boundaries | |
500 | (http://www.unicode.org/reports/tr29/) | |
501 | Returns UWordBreakValues values. @draft ICU 3.4 */ | |
502 | UCHAR_WORD_BREAK=0x1014, | |
503 | #endif /*U_HIDE_DRAFT_API*/ | |
374ca955 | 504 | /** One more than the last constant for enumerated/integer Unicode properties. @stable ICU 2.2 */ |
73c04bcf | 505 | UCHAR_INT_LIMIT=0x1015, |
b75a7d8f A |
506 | |
507 | /** Bitmask property General_Category_Mask. | |
508 | This is the General_Category property returned as a bit mask. | |
509 | When used in u_getIntPropertyValue(c), same as U_MASK(u_charType(c)), | |
510 | returns bit masks for UCharCategory values where exactly one bit is set. | |
511 | When used with u_getPropertyValueName() and u_getPropertyValueEnum(), | |
512 | a multi-bit mask is used for sets of categories like "Letters". | |
513 | Mask values should be cast to uint32_t. | |
374ca955 | 514 | @stable ICU 2.4 */ |
b75a7d8f | 515 | UCHAR_GENERAL_CATEGORY_MASK=0x2000, |
374ca955 | 516 | /** First constant for bit-mask Unicode properties. @stable ICU 2.4 */ |
b75a7d8f | 517 | UCHAR_MASK_START=UCHAR_GENERAL_CATEGORY_MASK, |
374ca955 | 518 | /** One more than the last constant for bit-mask Unicode properties. @stable ICU 2.4 */ |
73c04bcf | 519 | UCHAR_MASK_LIMIT=0x2001, |
b75a7d8f A |
520 | |
521 | /** Double property Numeric_Value. | |
374ca955 | 522 | Corresponds to u_getNumericValue. @stable ICU 2.4 */ |
b75a7d8f | 523 | UCHAR_NUMERIC_VALUE=0x3000, |
374ca955 | 524 | /** First constant for double Unicode properties. @stable ICU 2.4 */ |
b75a7d8f | 525 | UCHAR_DOUBLE_START=UCHAR_NUMERIC_VALUE, |
374ca955 | 526 | /** One more than the last constant for double Unicode properties. @stable ICU 2.4 */ |
73c04bcf | 527 | UCHAR_DOUBLE_LIMIT=0x3001, |
b75a7d8f A |
528 | |
529 | /** String property Age. | |
374ca955 | 530 | Corresponds to u_charAge. @stable ICU 2.4 */ |
b75a7d8f | 531 | UCHAR_AGE=0x4000, |
374ca955 | 532 | /** First constant for string Unicode properties. @stable ICU 2.4 */ |
b75a7d8f A |
533 | UCHAR_STRING_START=UCHAR_AGE, |
534 | /** String property Bidi_Mirroring_Glyph. | |
374ca955 | 535 | Corresponds to u_charMirror. @stable ICU 2.4 */ |
73c04bcf | 536 | UCHAR_BIDI_MIRRORING_GLYPH=0x4001, |
b75a7d8f | 537 | /** String property Case_Folding. |
374ca955 | 538 | Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */ |
73c04bcf | 539 | UCHAR_CASE_FOLDING=0x4002, |
b75a7d8f | 540 | /** String property ISO_Comment. |
374ca955 | 541 | Corresponds to u_getISOComment. @stable ICU 2.4 */ |
73c04bcf | 542 | UCHAR_ISO_COMMENT=0x4003, |
b75a7d8f | 543 | /** String property Lowercase_Mapping. |
374ca955 | 544 | Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */ |
73c04bcf | 545 | UCHAR_LOWERCASE_MAPPING=0x4004, |
b75a7d8f | 546 | /** String property Name. |
374ca955 | 547 | Corresponds to u_charName. @stable ICU 2.4 */ |
73c04bcf | 548 | UCHAR_NAME=0x4005, |
b75a7d8f | 549 | /** String property Simple_Case_Folding. |
374ca955 | 550 | Corresponds to u_foldCase. @stable ICU 2.4 */ |
73c04bcf | 551 | UCHAR_SIMPLE_CASE_FOLDING=0x4006, |
b75a7d8f | 552 | /** String property Simple_Lowercase_Mapping. |
374ca955 | 553 | Corresponds to u_tolower. @stable ICU 2.4 */ |
73c04bcf | 554 | UCHAR_SIMPLE_LOWERCASE_MAPPING=0x4007, |
b75a7d8f | 555 | /** String property Simple_Titlecase_Mapping. |
374ca955 | 556 | Corresponds to u_totitle. @stable ICU 2.4 */ |
73c04bcf | 557 | UCHAR_SIMPLE_TITLECASE_MAPPING=0x4008, |
b75a7d8f | 558 | /** String property Simple_Uppercase_Mapping. |
374ca955 | 559 | Corresponds to u_toupper. @stable ICU 2.4 */ |
73c04bcf | 560 | UCHAR_SIMPLE_UPPERCASE_MAPPING=0x4009, |
b75a7d8f | 561 | /** String property Titlecase_Mapping. |
374ca955 | 562 | Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */ |
73c04bcf | 563 | UCHAR_TITLECASE_MAPPING=0x400A, |
b75a7d8f | 564 | /** String property Unicode_1_Name. |
374ca955 | 565 | Corresponds to u_charName. @stable ICU 2.4 */ |
73c04bcf | 566 | UCHAR_UNICODE_1_NAME=0x400B, |
b75a7d8f | 567 | /** String property Uppercase_Mapping. |
374ca955 | 568 | Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */ |
73c04bcf | 569 | UCHAR_UPPERCASE_MAPPING=0x400C, |
374ca955 | 570 | /** One more than the last constant for string Unicode properties. @stable ICU 2.4 */ |
73c04bcf | 571 | UCHAR_STRING_LIMIT=0x400D, |
b75a7d8f | 572 | |
374ca955 | 573 | /** Represents a nonexistent or invalid property or property value. @stable ICU 2.4 */ |
b75a7d8f A |
574 | UCHAR_INVALID_CODE = -1 |
575 | } UProperty; | |
576 | ||
577 | /** | |
578 | * Data for enumerated Unicode general category types. | |
579 | * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html . | |
580 | * @stable ICU 2.0 | |
581 | */ | |
582 | typedef enum UCharCategory | |
583 | { | |
584 | /** See note !!. Comments of the form "Cn" are read by genpname. */ | |
585 | ||
586 | /** Non-category for unassigned and non-character code points. @stable ICU 2.0 */ | |
587 | U_UNASSIGNED = 0, | |
588 | /** Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as U_UNASSIGNED!) @stable ICU 2.0 */ | |
589 | U_GENERAL_OTHER_TYPES = 0, | |
590 | /** Lu @stable ICU 2.0 */ | |
591 | U_UPPERCASE_LETTER = 1, | |
592 | /** Ll @stable ICU 2.0 */ | |
593 | U_LOWERCASE_LETTER = 2, | |
594 | /** Lt @stable ICU 2.0 */ | |
595 | U_TITLECASE_LETTER = 3, | |
596 | /** Lm @stable ICU 2.0 */ | |
597 | U_MODIFIER_LETTER = 4, | |
598 | /** Lo @stable ICU 2.0 */ | |
599 | U_OTHER_LETTER = 5, | |
600 | /** Mn @stable ICU 2.0 */ | |
601 | U_NON_SPACING_MARK = 6, | |
602 | /** Me @stable ICU 2.0 */ | |
603 | U_ENCLOSING_MARK = 7, | |
604 | /** Mc @stable ICU 2.0 */ | |
605 | U_COMBINING_SPACING_MARK = 8, | |
606 | /** Nd @stable ICU 2.0 */ | |
607 | U_DECIMAL_DIGIT_NUMBER = 9, | |
608 | /** Nl @stable ICU 2.0 */ | |
609 | U_LETTER_NUMBER = 10, | |
610 | /** No @stable ICU 2.0 */ | |
611 | U_OTHER_NUMBER = 11, | |
612 | /** Zs @stable ICU 2.0 */ | |
613 | U_SPACE_SEPARATOR = 12, | |
614 | /** Zl @stable ICU 2.0 */ | |
615 | U_LINE_SEPARATOR = 13, | |
616 | /** Zp @stable ICU 2.0 */ | |
617 | U_PARAGRAPH_SEPARATOR = 14, | |
618 | /** Cc @stable ICU 2.0 */ | |
619 | U_CONTROL_CHAR = 15, | |
620 | /** Cf @stable ICU 2.0 */ | |
621 | U_FORMAT_CHAR = 16, | |
622 | /** Co @stable ICU 2.0 */ | |
623 | U_PRIVATE_USE_CHAR = 17, | |
624 | /** Cs @stable ICU 2.0 */ | |
625 | U_SURROGATE = 18, | |
626 | /** Pd @stable ICU 2.0 */ | |
627 | U_DASH_PUNCTUATION = 19, | |
628 | /** Ps @stable ICU 2.0 */ | |
629 | U_START_PUNCTUATION = 20, | |
630 | /** Pe @stable ICU 2.0 */ | |
631 | U_END_PUNCTUATION = 21, | |
632 | /** Pc @stable ICU 2.0 */ | |
633 | U_CONNECTOR_PUNCTUATION = 22, | |
634 | /** Po @stable ICU 2.0 */ | |
635 | U_OTHER_PUNCTUATION = 23, | |
636 | /** Sm @stable ICU 2.0 */ | |
637 | U_MATH_SYMBOL = 24, | |
638 | /** Sc @stable ICU 2.0 */ | |
639 | U_CURRENCY_SYMBOL = 25, | |
640 | /** Sk @stable ICU 2.0 */ | |
641 | U_MODIFIER_SYMBOL = 26, | |
642 | /** So @stable ICU 2.0 */ | |
643 | U_OTHER_SYMBOL = 27, | |
644 | /** Pi @stable ICU 2.0 */ | |
645 | U_INITIAL_PUNCTUATION = 28, | |
646 | /** Pf @stable ICU 2.0 */ | |
647 | U_FINAL_PUNCTUATION = 29, | |
648 | /** One higher than the last enum UCharCategory constant. @stable ICU 2.0 */ | |
649 | U_CHAR_CATEGORY_COUNT | |
650 | } UCharCategory; | |
651 | ||
652 | /** | |
653 | * U_GC_XX_MASK constants are bit flags corresponding to Unicode | |
654 | * general category values. | |
655 | * For each category, the nth bit is set if the numeric value of the | |
656 | * corresponding UCharCategory constant is n. | |
657 | * | |
658 | * There are also some U_GC_Y_MASK constants for groups of general categories | |
659 | * like L for all letter categories. | |
660 | * | |
661 | * @see u_charType | |
662 | * @see U_GET_GC_MASK | |
663 | * @see UCharCategory | |
664 | * @stable ICU 2.1 | |
665 | */ | |
666 | #define U_GC_CN_MASK U_MASK(U_GENERAL_OTHER_TYPES) | |
667 | ||
668 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
669 | #define U_GC_LU_MASK U_MASK(U_UPPERCASE_LETTER) | |
670 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
671 | #define U_GC_LL_MASK U_MASK(U_LOWERCASE_LETTER) | |
672 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
673 | #define U_GC_LT_MASK U_MASK(U_TITLECASE_LETTER) | |
674 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
675 | #define U_GC_LM_MASK U_MASK(U_MODIFIER_LETTER) | |
676 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
677 | #define U_GC_LO_MASK U_MASK(U_OTHER_LETTER) | |
678 | ||
679 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
680 | #define U_GC_MN_MASK U_MASK(U_NON_SPACING_MARK) | |
681 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
682 | #define U_GC_ME_MASK U_MASK(U_ENCLOSING_MARK) | |
683 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
684 | #define U_GC_MC_MASK U_MASK(U_COMBINING_SPACING_MARK) | |
685 | ||
686 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
687 | #define U_GC_ND_MASK U_MASK(U_DECIMAL_DIGIT_NUMBER) | |
688 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
689 | #define U_GC_NL_MASK U_MASK(U_LETTER_NUMBER) | |
690 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
691 | #define U_GC_NO_MASK U_MASK(U_OTHER_NUMBER) | |
692 | ||
693 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
694 | #define U_GC_ZS_MASK U_MASK(U_SPACE_SEPARATOR) | |
695 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
696 | #define U_GC_ZL_MASK U_MASK(U_LINE_SEPARATOR) | |
697 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
698 | #define U_GC_ZP_MASK U_MASK(U_PARAGRAPH_SEPARATOR) | |
699 | ||
700 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
701 | #define U_GC_CC_MASK U_MASK(U_CONTROL_CHAR) | |
702 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
703 | #define U_GC_CF_MASK U_MASK(U_FORMAT_CHAR) | |
704 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
705 | #define U_GC_CO_MASK U_MASK(U_PRIVATE_USE_CHAR) | |
706 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
707 | #define U_GC_CS_MASK U_MASK(U_SURROGATE) | |
708 | ||
709 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
710 | #define U_GC_PD_MASK U_MASK(U_DASH_PUNCTUATION) | |
711 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
712 | #define U_GC_PS_MASK U_MASK(U_START_PUNCTUATION) | |
713 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
714 | #define U_GC_PE_MASK U_MASK(U_END_PUNCTUATION) | |
715 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
716 | #define U_GC_PC_MASK U_MASK(U_CONNECTOR_PUNCTUATION) | |
717 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
718 | #define U_GC_PO_MASK U_MASK(U_OTHER_PUNCTUATION) | |
719 | ||
720 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
721 | #define U_GC_SM_MASK U_MASK(U_MATH_SYMBOL) | |
722 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
723 | #define U_GC_SC_MASK U_MASK(U_CURRENCY_SYMBOL) | |
724 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
725 | #define U_GC_SK_MASK U_MASK(U_MODIFIER_SYMBOL) | |
726 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
727 | #define U_GC_SO_MASK U_MASK(U_OTHER_SYMBOL) | |
728 | ||
729 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
730 | #define U_GC_PI_MASK U_MASK(U_INITIAL_PUNCTUATION) | |
731 | /** Mask constant for a UCharCategory. @stable ICU 2.1 */ | |
732 | #define U_GC_PF_MASK U_MASK(U_FINAL_PUNCTUATION) | |
733 | ||
734 | ||
735 | /** Mask constant for multiple UCharCategory bits (L Letters). @stable ICU 2.1 */ | |
736 | #define U_GC_L_MASK \ | |
737 | (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK|U_GC_LM_MASK|U_GC_LO_MASK) | |
738 | ||
739 | /** Mask constant for multiple UCharCategory bits (LC Cased Letters). @stable ICU 2.1 */ | |
740 | #define U_GC_LC_MASK \ | |
741 | (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK) | |
742 | ||
743 | /** Mask constant for multiple UCharCategory bits (M Marks). @stable ICU 2.1 */ | |
744 | #define U_GC_M_MASK (U_GC_MN_MASK|U_GC_ME_MASK|U_GC_MC_MASK) | |
745 | ||
746 | /** Mask constant for multiple UCharCategory bits (N Numbers). @stable ICU 2.1 */ | |
747 | #define U_GC_N_MASK (U_GC_ND_MASK|U_GC_NL_MASK|U_GC_NO_MASK) | |
748 | ||
749 | /** Mask constant for multiple UCharCategory bits (Z Separators). @stable ICU 2.1 */ | |
750 | #define U_GC_Z_MASK (U_GC_ZS_MASK|U_GC_ZL_MASK|U_GC_ZP_MASK) | |
751 | ||
752 | /** Mask constant for multiple UCharCategory bits (C Others). @stable ICU 2.1 */ | |
753 | #define U_GC_C_MASK \ | |
754 | (U_GC_CN_MASK|U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CO_MASK|U_GC_CS_MASK) | |
755 | ||
756 | /** Mask constant for multiple UCharCategory bits (P Punctuation). @stable ICU 2.1 */ | |
757 | #define U_GC_P_MASK \ | |
758 | (U_GC_PD_MASK|U_GC_PS_MASK|U_GC_PE_MASK|U_GC_PC_MASK|U_GC_PO_MASK| \ | |
759 | U_GC_PI_MASK|U_GC_PF_MASK) | |
760 | ||
761 | /** Mask constant for multiple UCharCategory bits (S Symbols). @stable ICU 2.1 */ | |
762 | #define U_GC_S_MASK (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK) | |
763 | ||
764 | /** | |
765 | * This specifies the language directional property of a character set. | |
766 | * @stable ICU 2.0 | |
767 | */ | |
768 | typedef enum UCharDirection { | |
769 | /** See note !!. Comments of the form "EN" are read by genpname. */ | |
770 | ||
771 | /** L @stable ICU 2.0 */ | |
772 | U_LEFT_TO_RIGHT = 0, | |
773 | /** R @stable ICU 2.0 */ | |
774 | U_RIGHT_TO_LEFT = 1, | |
775 | /** EN @stable ICU 2.0 */ | |
776 | U_EUROPEAN_NUMBER = 2, | |
777 | /** ES @stable ICU 2.0 */ | |
778 | U_EUROPEAN_NUMBER_SEPARATOR = 3, | |
779 | /** ET @stable ICU 2.0 */ | |
780 | U_EUROPEAN_NUMBER_TERMINATOR = 4, | |
781 | /** AN @stable ICU 2.0 */ | |
782 | U_ARABIC_NUMBER = 5, | |
783 | /** CS @stable ICU 2.0 */ | |
784 | U_COMMON_NUMBER_SEPARATOR = 6, | |
785 | /** B @stable ICU 2.0 */ | |
786 | U_BLOCK_SEPARATOR = 7, | |
787 | /** S @stable ICU 2.0 */ | |
788 | U_SEGMENT_SEPARATOR = 8, | |
789 | /** WS @stable ICU 2.0 */ | |
790 | U_WHITE_SPACE_NEUTRAL = 9, | |
791 | /** ON @stable ICU 2.0 */ | |
792 | U_OTHER_NEUTRAL = 10, | |
793 | /** LRE @stable ICU 2.0 */ | |
794 | U_LEFT_TO_RIGHT_EMBEDDING = 11, | |
795 | /** LRO @stable ICU 2.0 */ | |
796 | U_LEFT_TO_RIGHT_OVERRIDE = 12, | |
797 | /** AL @stable ICU 2.0 */ | |
798 | U_RIGHT_TO_LEFT_ARABIC = 13, | |
799 | /** RLE @stable ICU 2.0 */ | |
800 | U_RIGHT_TO_LEFT_EMBEDDING = 14, | |
801 | /** RLO @stable ICU 2.0 */ | |
802 | U_RIGHT_TO_LEFT_OVERRIDE = 15, | |
803 | /** PDF @stable ICU 2.0 */ | |
804 | U_POP_DIRECTIONAL_FORMAT = 16, | |
805 | /** NSM @stable ICU 2.0 */ | |
806 | U_DIR_NON_SPACING_MARK = 17, | |
807 | /** BN @stable ICU 2.0 */ | |
808 | U_BOUNDARY_NEUTRAL = 18, | |
809 | /** @stable ICU 2.0 */ | |
810 | U_CHAR_DIRECTION_COUNT | |
811 | } UCharDirection; | |
812 | ||
813 | /** | |
814 | * Constants for Unicode blocks, see the Unicode Data file Blocks.txt | |
815 | * @stable ICU 2.0 | |
816 | */ | |
817 | enum UBlockCode { | |
374ca955 A |
818 | |
819 | /** New No_Block value in Unicode 4. @stable ICU 2.6 */ | |
b75a7d8f A |
820 | UBLOCK_NO_BLOCK = 0, /*[none]*/ /* Special range indicating No_Block */ |
821 | ||
822 | /** @stable ICU 2.0 */ | |
823 | UBLOCK_BASIC_LATIN = 1, /*[0000]*/ /*See note !!*/ | |
824 | ||
825 | /** @stable ICU 2.0 */ | |
826 | UBLOCK_LATIN_1_SUPPLEMENT=2, /*[0080]*/ | |
827 | ||
828 | /** @stable ICU 2.0 */ | |
829 | UBLOCK_LATIN_EXTENDED_A =3, /*[0100]*/ | |
830 | ||
831 | /** @stable ICU 2.0 */ | |
832 | UBLOCK_LATIN_EXTENDED_B =4, /*[0180]*/ | |
833 | ||
834 | /** @stable ICU 2.0 */ | |
835 | UBLOCK_IPA_EXTENSIONS =5, /*[0250]*/ | |
836 | ||
837 | /** @stable ICU 2.0 */ | |
838 | UBLOCK_SPACING_MODIFIER_LETTERS =6, /*[02B0]*/ | |
839 | ||
840 | /** @stable ICU 2.0 */ | |
841 | UBLOCK_COMBINING_DIACRITICAL_MARKS =7, /*[0300]*/ | |
842 | ||
843 | /** | |
844 | * Unicode 3.2 renames this block to "Greek and Coptic". | |
845 | * @stable ICU 2.0 | |
846 | */ | |
847 | UBLOCK_GREEK =8, /*[0370]*/ | |
848 | ||
849 | /** @stable ICU 2.0 */ | |
850 | UBLOCK_CYRILLIC =9, /*[0400]*/ | |
851 | ||
852 | /** @stable ICU 2.0 */ | |
853 | UBLOCK_ARMENIAN =10, /*[0530]*/ | |
854 | ||
855 | /** @stable ICU 2.0 */ | |
856 | UBLOCK_HEBREW =11, /*[0590]*/ | |
857 | ||
858 | /** @stable ICU 2.0 */ | |
859 | UBLOCK_ARABIC =12, /*[0600]*/ | |
860 | ||
861 | /** @stable ICU 2.0 */ | |
862 | UBLOCK_SYRIAC =13, /*[0700]*/ | |
863 | ||
864 | /** @stable ICU 2.0 */ | |
865 | UBLOCK_THAANA =14, /*[0780]*/ | |
866 | ||
867 | /** @stable ICU 2.0 */ | |
868 | UBLOCK_DEVANAGARI =15, /*[0900]*/ | |
869 | ||
870 | /** @stable ICU 2.0 */ | |
871 | UBLOCK_BENGALI =16, /*[0980]*/ | |
872 | ||
873 | /** @stable ICU 2.0 */ | |
874 | UBLOCK_GURMUKHI =17, /*[0A00]*/ | |
875 | ||
876 | /** @stable ICU 2.0 */ | |
877 | UBLOCK_GUJARATI =18, /*[0A80]*/ | |
878 | ||
879 | /** @stable ICU 2.0 */ | |
880 | UBLOCK_ORIYA =19, /*[0B00]*/ | |
881 | ||
882 | /** @stable ICU 2.0 */ | |
883 | UBLOCK_TAMIL =20, /*[0B80]*/ | |
884 | ||
885 | /** @stable ICU 2.0 */ | |
886 | UBLOCK_TELUGU =21, /*[0C00]*/ | |
887 | ||
888 | /** @stable ICU 2.0 */ | |
889 | UBLOCK_KANNADA =22, /*[0C80]*/ | |
890 | ||
891 | /** @stable ICU 2.0 */ | |
892 | UBLOCK_MALAYALAM =23, /*[0D00]*/ | |
893 | ||
894 | /** @stable ICU 2.0 */ | |
895 | UBLOCK_SINHALA =24, /*[0D80]*/ | |
896 | ||
897 | /** @stable ICU 2.0 */ | |
898 | UBLOCK_THAI =25, /*[0E00]*/ | |
899 | ||
900 | /** @stable ICU 2.0 */ | |
901 | UBLOCK_LAO =26, /*[0E80]*/ | |
902 | ||
903 | /** @stable ICU 2.0 */ | |
904 | UBLOCK_TIBETAN =27, /*[0F00]*/ | |
905 | ||
906 | /** @stable ICU 2.0 */ | |
907 | UBLOCK_MYANMAR =28, /*[1000]*/ | |
908 | ||
909 | /** @stable ICU 2.0 */ | |
910 | UBLOCK_GEORGIAN =29, /*[10A0]*/ | |
911 | ||
912 | /** @stable ICU 2.0 */ | |
913 | UBLOCK_HANGUL_JAMO =30, /*[1100]*/ | |
914 | ||
915 | /** @stable ICU 2.0 */ | |
916 | UBLOCK_ETHIOPIC =31, /*[1200]*/ | |
917 | ||
918 | /** @stable ICU 2.0 */ | |
919 | UBLOCK_CHEROKEE =32, /*[13A0]*/ | |
920 | ||
921 | /** @stable ICU 2.0 */ | |
922 | UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS =33, /*[1400]*/ | |
923 | ||
924 | /** @stable ICU 2.0 */ | |
925 | UBLOCK_OGHAM =34, /*[1680]*/ | |
926 | ||
927 | /** @stable ICU 2.0 */ | |
928 | UBLOCK_RUNIC =35, /*[16A0]*/ | |
929 | ||
930 | /** @stable ICU 2.0 */ | |
931 | UBLOCK_KHMER =36, /*[1780]*/ | |
932 | ||
933 | /** @stable ICU 2.0 */ | |
934 | UBLOCK_MONGOLIAN =37, /*[1800]*/ | |
935 | ||
936 | /** @stable ICU 2.0 */ | |
937 | UBLOCK_LATIN_EXTENDED_ADDITIONAL =38, /*[1E00]*/ | |
938 | ||
939 | /** @stable ICU 2.0 */ | |
940 | UBLOCK_GREEK_EXTENDED =39, /*[1F00]*/ | |
941 | ||
942 | /** @stable ICU 2.0 */ | |
943 | UBLOCK_GENERAL_PUNCTUATION =40, /*[2000]*/ | |
944 | ||
945 | /** @stable ICU 2.0 */ | |
946 | UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS =41, /*[2070]*/ | |
947 | ||
948 | /** @stable ICU 2.0 */ | |
949 | UBLOCK_CURRENCY_SYMBOLS =42, /*[20A0]*/ | |
950 | ||
951 | /** | |
952 | * Unicode 3.2 renames this block to "Combining Diacritical Marks for Symbols". | |
953 | * @stable ICU 2.0 | |
954 | */ | |
955 | UBLOCK_COMBINING_MARKS_FOR_SYMBOLS =43, /*[20D0]*/ | |
956 | ||
957 | /** @stable ICU 2.0 */ | |
958 | UBLOCK_LETTERLIKE_SYMBOLS =44, /*[2100]*/ | |
959 | ||
960 | /** @stable ICU 2.0 */ | |
961 | UBLOCK_NUMBER_FORMS =45, /*[2150]*/ | |
962 | ||
963 | /** @stable ICU 2.0 */ | |
964 | UBLOCK_ARROWS =46, /*[2190]*/ | |
965 | ||
966 | /** @stable ICU 2.0 */ | |
967 | UBLOCK_MATHEMATICAL_OPERATORS =47, /*[2200]*/ | |
968 | ||
969 | /** @stable ICU 2.0 */ | |
970 | UBLOCK_MISCELLANEOUS_TECHNICAL =48, /*[2300]*/ | |
971 | ||
972 | /** @stable ICU 2.0 */ | |
973 | UBLOCK_CONTROL_PICTURES =49, /*[2400]*/ | |
974 | ||
975 | /** @stable ICU 2.0 */ | |
976 | UBLOCK_OPTICAL_CHARACTER_RECOGNITION =50, /*[2440]*/ | |
977 | ||
978 | /** @stable ICU 2.0 */ | |
979 | UBLOCK_ENCLOSED_ALPHANUMERICS =51, /*[2460]*/ | |
980 | ||
981 | /** @stable ICU 2.0 */ | |
982 | UBLOCK_BOX_DRAWING =52, /*[2500]*/ | |
983 | ||
984 | /** @stable ICU 2.0 */ | |
985 | UBLOCK_BLOCK_ELEMENTS =53, /*[2580]*/ | |
986 | ||
987 | /** @stable ICU 2.0 */ | |
988 | UBLOCK_GEOMETRIC_SHAPES =54, /*[25A0]*/ | |
989 | ||
990 | /** @stable ICU 2.0 */ | |
991 | UBLOCK_MISCELLANEOUS_SYMBOLS =55, /*[2600]*/ | |
992 | ||
993 | /** @stable ICU 2.0 */ | |
994 | UBLOCK_DINGBATS =56, /*[2700]*/ | |
995 | ||
996 | /** @stable ICU 2.0 */ | |
997 | UBLOCK_BRAILLE_PATTERNS =57, /*[2800]*/ | |
998 | ||
999 | /** @stable ICU 2.0 */ | |
1000 | UBLOCK_CJK_RADICALS_SUPPLEMENT =58, /*[2E80]*/ | |
1001 | ||
1002 | /** @stable ICU 2.0 */ | |
1003 | UBLOCK_KANGXI_RADICALS =59, /*[2F00]*/ | |
1004 | ||
1005 | /** @stable ICU 2.0 */ | |
1006 | UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS =60, /*[2FF0]*/ | |
1007 | ||
1008 | /** @stable ICU 2.0 */ | |
1009 | UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION =61, /*[3000]*/ | |
1010 | ||
1011 | /** @stable ICU 2.0 */ | |
1012 | UBLOCK_HIRAGANA =62, /*[3040]*/ | |
1013 | ||
1014 | /** @stable ICU 2.0 */ | |
1015 | UBLOCK_KATAKANA =63, /*[30A0]*/ | |
1016 | ||
1017 | /** @stable ICU 2.0 */ | |
1018 | UBLOCK_BOPOMOFO =64, /*[3100]*/ | |
1019 | ||
1020 | /** @stable ICU 2.0 */ | |
1021 | UBLOCK_HANGUL_COMPATIBILITY_JAMO =65, /*[3130]*/ | |
1022 | ||
1023 | /** @stable ICU 2.0 */ | |
1024 | UBLOCK_KANBUN =66, /*[3190]*/ | |
1025 | ||
1026 | /** @stable ICU 2.0 */ | |
1027 | UBLOCK_BOPOMOFO_EXTENDED =67, /*[31A0]*/ | |
1028 | ||
1029 | /** @stable ICU 2.0 */ | |
1030 | UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS =68, /*[3200]*/ | |
1031 | ||
1032 | /** @stable ICU 2.0 */ | |
1033 | UBLOCK_CJK_COMPATIBILITY =69, /*[3300]*/ | |
1034 | ||
1035 | /** @stable ICU 2.0 */ | |
1036 | UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A =70, /*[3400]*/ | |
1037 | ||
1038 | /** @stable ICU 2.0 */ | |
1039 | UBLOCK_CJK_UNIFIED_IDEOGRAPHS =71, /*[4E00]*/ | |
1040 | ||
1041 | /** @stable ICU 2.0 */ | |
1042 | UBLOCK_YI_SYLLABLES =72, /*[A000]*/ | |
1043 | ||
1044 | /** @stable ICU 2.0 */ | |
1045 | UBLOCK_YI_RADICALS =73, /*[A490]*/ | |
1046 | ||
1047 | /** @stable ICU 2.0 */ | |
1048 | UBLOCK_HANGUL_SYLLABLES =74, /*[AC00]*/ | |
1049 | ||
1050 | /** @stable ICU 2.0 */ | |
1051 | UBLOCK_HIGH_SURROGATES =75, /*[D800]*/ | |
1052 | ||
1053 | /** @stable ICU 2.0 */ | |
1054 | UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, /*[DB80]*/ | |
1055 | ||
1056 | /** @stable ICU 2.0 */ | |
1057 | UBLOCK_LOW_SURROGATES =77, /*[DC00]*/ | |
1058 | ||
1059 | /** | |
1060 | * Same as UBLOCK_PRIVATE_USE_AREA. | |
1061 | * Until Unicode 3.1.1, the corresponding block name was "Private Use", | |
1062 | * and multiple code point ranges had this block. | |
1063 | * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and | |
1064 | * adds separate blocks for the supplementary PUAs. | |
1065 | * | |
1066 | * @stable ICU 2.0 | |
1067 | */ | |
1068 | UBLOCK_PRIVATE_USE = 78, | |
1069 | /** | |
1070 | * Same as UBLOCK_PRIVATE_USE. | |
1071 | * Until Unicode 3.1.1, the corresponding block name was "Private Use", | |
1072 | * and multiple code point ranges had this block. | |
1073 | * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and | |
1074 | * adds separate blocks for the supplementary PUAs. | |
1075 | * | |
1076 | * @stable ICU 2.0 | |
1077 | */ | |
1078 | UBLOCK_PRIVATE_USE_AREA =UBLOCK_PRIVATE_USE, /*[E000]*/ | |
1079 | ||
1080 | /** @stable ICU 2.0 */ | |
1081 | UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, /*[F900]*/ | |
1082 | ||
1083 | /** @stable ICU 2.0 */ | |
1084 | UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, /*[FB00]*/ | |
1085 | ||
1086 | /** @stable ICU 2.0 */ | |
1087 | UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, /*[FB50]*/ | |
1088 | ||
1089 | /** @stable ICU 2.0 */ | |
1090 | UBLOCK_COMBINING_HALF_MARKS =82, /*[FE20]*/ | |
1091 | ||
1092 | /** @stable ICU 2.0 */ | |
1093 | UBLOCK_CJK_COMPATIBILITY_FORMS =83, /*[FE30]*/ | |
1094 | ||
1095 | /** @stable ICU 2.0 */ | |
1096 | UBLOCK_SMALL_FORM_VARIANTS =84, /*[FE50]*/ | |
1097 | ||
1098 | /** @stable ICU 2.0 */ | |
1099 | UBLOCK_ARABIC_PRESENTATION_FORMS_B =85, /*[FE70]*/ | |
1100 | ||
1101 | /** @stable ICU 2.0 */ | |
1102 | UBLOCK_SPECIALS =86, /*[FFF0]*/ | |
1103 | ||
1104 | /** @stable ICU 2.0 */ | |
1105 | UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, /*[FF00]*/ | |
1106 | ||
1107 | /* New blocks in Unicode 3.1 */ | |
1108 | ||
1109 | /** @stable ICU 2.0 */ | |
1110 | UBLOCK_OLD_ITALIC = 88 , /*[10300]*/ | |
1111 | /** @stable ICU 2.0 */ | |
1112 | UBLOCK_GOTHIC = 89 , /*[10330]*/ | |
1113 | /** @stable ICU 2.0 */ | |
1114 | UBLOCK_DESERET = 90 , /*[10400]*/ | |
1115 | /** @stable ICU 2.0 */ | |
1116 | UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91 , /*[1D000]*/ | |
1117 | /** @stable ICU 2.0 */ | |
1118 | UBLOCK_MUSICAL_SYMBOLS = 92 , /*[1D100]*/ | |
1119 | /** @stable ICU 2.0 */ | |
1120 | UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93 , /*[1D400]*/ | |
1121 | /** @stable ICU 2.0 */ | |
1122 | UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94 , /*[20000]*/ | |
1123 | /** @stable ICU 2.0 */ | |
1124 | UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95 , /*[2F800]*/ | |
1125 | /** @stable ICU 2.0 */ | |
1126 | UBLOCK_TAGS = 96, /*[E0000]*/ | |
1127 | ||
1128 | /* New blocks in Unicode 3.2 */ | |
1129 | ||
374ca955 A |
1130 | /** |
1131 | * Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrillic Supplement". | |
1132 | * @stable ICU 2.2 | |
1133 | */ | |
1134 | UBLOCK_CYRILLIC_SUPPLEMENTARY = 97, | |
73c04bcf | 1135 | /** @stable ICU 3.0 */ |
374ca955 A |
1136 | UBLOCK_CYRILLIC_SUPPLEMENT = UBLOCK_CYRILLIC_SUPPLEMENTARY, /*[0500]*/ |
1137 | /** @stable ICU 2.2 */ | |
b75a7d8f | 1138 | UBLOCK_TAGALOG = 98, /*[1700]*/ |
374ca955 | 1139 | /** @stable ICU 2.2 */ |
b75a7d8f | 1140 | UBLOCK_HANUNOO = 99, /*[1720]*/ |
374ca955 | 1141 | /** @stable ICU 2.2 */ |
b75a7d8f | 1142 | UBLOCK_BUHID = 100, /*[1740]*/ |
374ca955 | 1143 | /** @stable ICU 2.2 */ |
b75a7d8f | 1144 | UBLOCK_TAGBANWA = 101, /*[1760]*/ |
374ca955 | 1145 | /** @stable ICU 2.2 */ |
b75a7d8f | 1146 | UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, /*[27C0]*/ |
374ca955 | 1147 | /** @stable ICU 2.2 */ |
b75a7d8f | 1148 | UBLOCK_SUPPLEMENTAL_ARROWS_A = 103, /*[27F0]*/ |
374ca955 | 1149 | /** @stable ICU 2.2 */ |
b75a7d8f | 1150 | UBLOCK_SUPPLEMENTAL_ARROWS_B = 104, /*[2900]*/ |
374ca955 | 1151 | /** @stable ICU 2.2 */ |
b75a7d8f | 1152 | UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = 105, /*[2980]*/ |
374ca955 | 1153 | /** @stable ICU 2.2 */ |
b75a7d8f | 1154 | UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS = 106, /*[2A00]*/ |
374ca955 | 1155 | /** @stable ICU 2.2 */ |
b75a7d8f | 1156 | UBLOCK_KATAKANA_PHONETIC_EXTENSIONS = 107, /*[31F0]*/ |
374ca955 | 1157 | /** @stable ICU 2.2 */ |
b75a7d8f | 1158 | UBLOCK_VARIATION_SELECTORS = 108, /*[FE00]*/ |
374ca955 | 1159 | /** @stable ICU 2.2 */ |
b75a7d8f | 1160 | UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A = 109, /*[F0000]*/ |
374ca955 | 1161 | /** @stable ICU 2.2 */ |
b75a7d8f A |
1162 | UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B = 110, /*[100000]*/ |
1163 | ||
1164 | /* New blocks in Unicode 4 */ | |
1165 | ||
374ca955 | 1166 | /** @stable ICU 2.6 */ |
b75a7d8f | 1167 | UBLOCK_LIMBU = 111, /*[1900]*/ |
374ca955 | 1168 | /** @stable ICU 2.6 */ |
b75a7d8f | 1169 | UBLOCK_TAI_LE = 112, /*[1950]*/ |
374ca955 | 1170 | /** @stable ICU 2.6 */ |
b75a7d8f | 1171 | UBLOCK_KHMER_SYMBOLS = 113, /*[19E0]*/ |
374ca955 | 1172 | /** @stable ICU 2.6 */ |
b75a7d8f | 1173 | UBLOCK_PHONETIC_EXTENSIONS = 114, /*[1D00]*/ |
374ca955 | 1174 | /** @stable ICU 2.6 */ |
b75a7d8f | 1175 | UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS = 115, /*[2B00]*/ |
374ca955 | 1176 | /** @stable ICU 2.6 */ |
b75a7d8f | 1177 | UBLOCK_YIJING_HEXAGRAM_SYMBOLS = 116, /*[4DC0]*/ |
374ca955 | 1178 | /** @stable ICU 2.6 */ |
b75a7d8f | 1179 | UBLOCK_LINEAR_B_SYLLABARY = 117, /*[10000]*/ |
374ca955 | 1180 | /** @stable ICU 2.6 */ |
b75a7d8f | 1181 | UBLOCK_LINEAR_B_IDEOGRAMS = 118, /*[10080]*/ |
374ca955 | 1182 | /** @stable ICU 2.6 */ |
b75a7d8f | 1183 | UBLOCK_AEGEAN_NUMBERS = 119, /*[10100]*/ |
374ca955 | 1184 | /** @stable ICU 2.6 */ |
b75a7d8f | 1185 | UBLOCK_UGARITIC = 120, /*[10380]*/ |
374ca955 | 1186 | /** @stable ICU 2.6 */ |
b75a7d8f | 1187 | UBLOCK_SHAVIAN = 121, /*[10450]*/ |
374ca955 | 1188 | /** @stable ICU 2.6 */ |
b75a7d8f | 1189 | UBLOCK_OSMANYA = 122, /*[10480]*/ |
374ca955 | 1190 | /** @stable ICU 2.6 */ |
b75a7d8f | 1191 | UBLOCK_CYPRIOT_SYLLABARY = 123, /*[10800]*/ |
374ca955 | 1192 | /** @stable ICU 2.6 */ |
b75a7d8f | 1193 | UBLOCK_TAI_XUAN_JING_SYMBOLS = 124, /*[1D300]*/ |
374ca955 | 1194 | /** @stable ICU 2.6 */ |
b75a7d8f A |
1195 | UBLOCK_VARIATION_SELECTORS_SUPPLEMENT = 125, /*[E0100]*/ |
1196 | ||
73c04bcf A |
1197 | #ifndef U_HIDE_DRAFT_API |
1198 | /* New blocks in Unicode 4.1 */ | |
1199 | ||
1200 | /** @draft ICU 3.4 */ | |
1201 | UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION = 126, /*[1D200]*/ | |
1202 | /** @draft ICU 3.4 */ | |
1203 | UBLOCK_ANCIENT_GREEK_NUMBERS = 127, /*[10140]*/ | |
1204 | /** @draft ICU 3.4 */ | |
1205 | UBLOCK_ARABIC_SUPPLEMENT = 128, /*[0750]*/ | |
1206 | /** @draft ICU 3.4 */ | |
1207 | UBLOCK_BUGINESE = 129, /*[1A00]*/ | |
1208 | /** @draft ICU 3.4 */ | |
1209 | UBLOCK_CJK_STROKES = 130, /*[31C0]*/ | |
1210 | /** @draft ICU 3.4 */ | |
1211 | UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = 131, /*[1DC0]*/ | |
1212 | /** @draft ICU 3.4 */ | |
1213 | UBLOCK_COPTIC = 132, /*[2C80]*/ | |
1214 | /** @draft ICU 3.4 */ | |
1215 | UBLOCK_ETHIOPIC_EXTENDED = 133, /*[2D80]*/ | |
1216 | /** @draft ICU 3.4 */ | |
1217 | UBLOCK_ETHIOPIC_SUPPLEMENT = 134, /*[1380]*/ | |
1218 | /** @draft ICU 3.4 */ | |
1219 | UBLOCK_GEORGIAN_SUPPLEMENT = 135, /*[2D00]*/ | |
1220 | /** @draft ICU 3.4 */ | |
1221 | UBLOCK_GLAGOLITIC = 136, /*[2C00]*/ | |
1222 | /** @draft ICU 3.4 */ | |
1223 | UBLOCK_KHAROSHTHI = 137, /*[10A00]*/ | |
1224 | /** @draft ICU 3.4 */ | |
1225 | UBLOCK_MODIFIER_TONE_LETTERS = 138, /*[A700]*/ | |
1226 | /** @draft ICU 3.4 */ | |
1227 | UBLOCK_NEW_TAI_LUE = 139, /*[1980]*/ | |
1228 | /** @draft ICU 3.4 */ | |
1229 | UBLOCK_OLD_PERSIAN = 140, /*[103A0]*/ | |
1230 | /** @draft ICU 3.4 */ | |
1231 | UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT = 141, /*[1D80]*/ | |
1232 | /** @draft ICU 3.4 */ | |
1233 | UBLOCK_SUPPLEMENTAL_PUNCTUATION = 142, /*[2E00]*/ | |
1234 | /** @draft ICU 3.4 */ | |
1235 | UBLOCK_SYLOTI_NAGRI = 143, /*[A800]*/ | |
1236 | /** @draft ICU 3.4 */ | |
1237 | UBLOCK_TIFINAGH = 144, /*[2D30]*/ | |
1238 | /** @draft ICU 3.4 */ | |
1239 | UBLOCK_VERTICAL_FORMS = 145, /*[FE10]*/ | |
1240 | ||
1241 | /* New blocks in Unicode 5.0 */ | |
1242 | ||
1243 | /** @draft ICU 3.6 */ | |
1244 | UBLOCK_NKO = 146, /*[07C0]*/ | |
1245 | /** @draft ICU 3.6 */ | |
1246 | UBLOCK_BALINESE = 147, /*[1B00]*/ | |
1247 | /** @draft ICU 3.6 */ | |
1248 | UBLOCK_LATIN_EXTENDED_C = 148, /*[2C60]*/ | |
1249 | /** @draft ICU 3.6 */ | |
1250 | UBLOCK_LATIN_EXTENDED_D = 149, /*[A720]*/ | |
1251 | /** @draft ICU 3.6 */ | |
1252 | UBLOCK_PHAGS_PA = 150, /*[A840]*/ | |
1253 | /** @draft ICU 3.6 */ | |
1254 | UBLOCK_PHOENICIAN = 151, /*[10900]*/ | |
1255 | /** @draft ICU 3.6 */ | |
1256 | UBLOCK_CUNEIFORM = 152, /*[12000]*/ | |
1257 | /** @draft ICU 3.6 */ | |
1258 | UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION = 153, /*[12400]*/ | |
1259 | /** @draft ICU 3.6 */ | |
1260 | UBLOCK_COUNTING_ROD_NUMERALS = 154, /*[1D360]*/ | |
1261 | ||
1262 | #endif /*U_HIDE_DRAFT_API*/ | |
1263 | ||
1264 | /** @stable ICU 2.0 */ | |
1265 | UBLOCK_COUNT = 155, | |
b75a7d8f A |
1266 | |
1267 | /** @stable ICU 2.0 */ | |
1268 | UBLOCK_INVALID_CODE=-1 | |
1269 | }; | |
1270 | ||
1271 | /** @stable ICU 2.0 */ | |
1272 | typedef enum UBlockCode UBlockCode; | |
1273 | ||
1274 | /** | |
1275 | * East Asian Width constants. | |
1276 | * | |
1277 | * @see UCHAR_EAST_ASIAN_WIDTH | |
1278 | * @see u_getIntPropertyValue | |
374ca955 | 1279 | * @stable ICU 2.2 |
b75a7d8f A |
1280 | */ |
1281 | typedef enum UEastAsianWidth { | |
1282 | U_EA_NEUTRAL, /*[N]*/ /*See note !!*/ | |
1283 | U_EA_AMBIGUOUS, /*[A]*/ | |
1284 | U_EA_HALFWIDTH, /*[H]*/ | |
1285 | U_EA_FULLWIDTH, /*[F]*/ | |
1286 | U_EA_NARROW, /*[Na]*/ | |
1287 | U_EA_WIDE, /*[W]*/ | |
1288 | U_EA_COUNT | |
1289 | } UEastAsianWidth; | |
1290 | /* | |
1291 | * Implementation note: | |
1292 | * Keep UEastAsianWidth constant values in sync with names list in genprops/props2.c. | |
1293 | */ | |
1294 | ||
1295 | /** | |
1296 | * Selector constants for u_charName(). | |
1297 | * u_charName() returns the "modern" name of a | |
1298 | * Unicode character; or the name that was defined in | |
1299 | * Unicode version 1.0, before the Unicode standard merged | |
1300 | * with ISO-10646; or an "extended" name that gives each | |
1301 | * Unicode code point a unique name. | |
1302 | * | |
1303 | * @see u_charName | |
1304 | * @stable ICU 2.0 | |
1305 | */ | |
1306 | typedef enum UCharNameChoice { | |
1307 | U_UNICODE_CHAR_NAME, | |
1308 | U_UNICODE_10_CHAR_NAME, | |
1309 | U_EXTENDED_CHAR_NAME, | |
1310 | U_CHAR_NAME_CHOICE_COUNT | |
1311 | } UCharNameChoice; | |
1312 | ||
1313 | /** | |
1314 | * Selector constants for u_getPropertyName() and | |
1315 | * u_getPropertyValueName(). These selectors are used to choose which | |
1316 | * name is returned for a given property or value. All properties and | |
1317 | * values have a long name. Most have a short name, but some do not. | |
1318 | * Unicode allows for additional names, beyond the long and short | |
1319 | * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where | |
1320 | * i=1, 2,... | |
1321 | * | |
1322 | * @see u_getPropertyName() | |
1323 | * @see u_getPropertyValueName() | |
374ca955 | 1324 | * @stable ICU 2.4 |
b75a7d8f A |
1325 | */ |
1326 | typedef enum UPropertyNameChoice { | |
1327 | U_SHORT_PROPERTY_NAME, | |
1328 | U_LONG_PROPERTY_NAME, | |
1329 | U_PROPERTY_NAME_CHOICE_COUNT | |
1330 | } UPropertyNameChoice; | |
1331 | ||
1332 | /** | |
1333 | * Decomposition Type constants. | |
1334 | * | |
1335 | * @see UCHAR_DECOMPOSITION_TYPE | |
374ca955 | 1336 | * @stable ICU 2.2 |
b75a7d8f A |
1337 | */ |
1338 | typedef enum UDecompositionType { | |
1339 | U_DT_NONE, /*[none]*/ /*See note !!*/ | |
1340 | U_DT_CANONICAL, /*[can]*/ | |
1341 | U_DT_COMPAT, /*[com]*/ | |
1342 | U_DT_CIRCLE, /*[enc]*/ | |
1343 | U_DT_FINAL, /*[fin]*/ | |
1344 | U_DT_FONT, /*[font]*/ | |
1345 | U_DT_FRACTION, /*[fra]*/ | |
1346 | U_DT_INITIAL, /*[init]*/ | |
1347 | U_DT_ISOLATED, /*[iso]*/ | |
1348 | U_DT_MEDIAL, /*[med]*/ | |
1349 | U_DT_NARROW, /*[nar]*/ | |
1350 | U_DT_NOBREAK, /*[nb]*/ | |
1351 | U_DT_SMALL, /*[sml]*/ | |
1352 | U_DT_SQUARE, /*[sqr]*/ | |
1353 | U_DT_SUB, /*[sub]*/ | |
1354 | U_DT_SUPER, /*[sup]*/ | |
1355 | U_DT_VERTICAL, /*[vert]*/ | |
1356 | U_DT_WIDE, /*[wide]*/ | |
1357 | U_DT_COUNT /* 18 */ | |
1358 | } UDecompositionType; | |
1359 | ||
1360 | /** | |
1361 | * Joining Type constants. | |
1362 | * | |
1363 | * @see UCHAR_JOINING_TYPE | |
374ca955 | 1364 | * @stable ICU 2.2 |
b75a7d8f A |
1365 | */ |
1366 | typedef enum UJoiningType { | |
1367 | U_JT_NON_JOINING, /*[U]*/ /*See note !!*/ | |
1368 | U_JT_JOIN_CAUSING, /*[C]*/ | |
1369 | U_JT_DUAL_JOINING, /*[D]*/ | |
1370 | U_JT_LEFT_JOINING, /*[L]*/ | |
1371 | U_JT_RIGHT_JOINING, /*[R]*/ | |
1372 | U_JT_TRANSPARENT, /*[T]*/ | |
1373 | U_JT_COUNT /* 6 */ | |
1374 | } UJoiningType; | |
1375 | ||
1376 | /** | |
1377 | * Joining Group constants. | |
1378 | * | |
1379 | * @see UCHAR_JOINING_GROUP | |
374ca955 | 1380 | * @stable ICU 2.2 |
b75a7d8f A |
1381 | */ |
1382 | typedef enum UJoiningGroup { | |
1383 | U_JG_NO_JOINING_GROUP, | |
1384 | U_JG_AIN, | |
1385 | U_JG_ALAPH, | |
1386 | U_JG_ALEF, | |
1387 | U_JG_BEH, | |
1388 | U_JG_BETH, | |
1389 | U_JG_DAL, | |
1390 | U_JG_DALATH_RISH, | |
1391 | U_JG_E, | |
1392 | U_JG_FEH, | |
1393 | U_JG_FINAL_SEMKATH, | |
1394 | U_JG_GAF, | |
1395 | U_JG_GAMAL, | |
1396 | U_JG_HAH, | |
1397 | U_JG_HAMZA_ON_HEH_GOAL, | |
1398 | U_JG_HE, | |
1399 | U_JG_HEH, | |
1400 | U_JG_HEH_GOAL, | |
1401 | U_JG_HETH, | |
1402 | U_JG_KAF, | |
1403 | U_JG_KAPH, | |
1404 | U_JG_KNOTTED_HEH, | |
1405 | U_JG_LAM, | |
1406 | U_JG_LAMADH, | |
1407 | U_JG_MEEM, | |
1408 | U_JG_MIM, | |
1409 | U_JG_NOON, | |
1410 | U_JG_NUN, | |
1411 | U_JG_PE, | |
1412 | U_JG_QAF, | |
1413 | U_JG_QAPH, | |
1414 | U_JG_REH, | |
1415 | U_JG_REVERSED_PE, | |
1416 | U_JG_SAD, | |
1417 | U_JG_SADHE, | |
1418 | U_JG_SEEN, | |
1419 | U_JG_SEMKATH, | |
1420 | U_JG_SHIN, | |
1421 | U_JG_SWASH_KAF, | |
1422 | U_JG_SYRIAC_WAW, | |
1423 | U_JG_TAH, | |
1424 | U_JG_TAW, | |
1425 | U_JG_TEH_MARBUTA, | |
1426 | U_JG_TETH, | |
1427 | U_JG_WAW, | |
1428 | U_JG_YEH, | |
1429 | U_JG_YEH_BARREE, | |
1430 | U_JG_YEH_WITH_TAIL, | |
1431 | U_JG_YUDH, | |
1432 | U_JG_YUDH_HE, | |
1433 | U_JG_ZAIN, | |
374ca955 A |
1434 | U_JG_FE, /**< @stable ICU 2.6 */ |
1435 | U_JG_KHAPH, /**< @stable ICU 2.6 */ | |
1436 | U_JG_ZHAIN, /**< @stable ICU 2.6 */ | |
b75a7d8f A |
1437 | U_JG_COUNT |
1438 | } UJoiningGroup; | |
1439 | ||
73c04bcf A |
1440 | /** |
1441 | * Grapheme Cluster Break constants. | |
1442 | * | |
1443 | * @see UCHAR_GRAPHEME_CLUSTER_BREAK | |
1444 | * @draft ICU 3.4 | |
1445 | */ | |
1446 | typedef enum UGraphemeClusterBreak { | |
1447 | #ifndef U_HIDE_DRAFT_API | |
1448 | U_GCB_OTHER = 0, /*[XX]*/ /*See note !!*/ | |
1449 | U_GCB_CONTROL = 1, /*[CN]*/ | |
1450 | U_GCB_CR = 2, /*[CR]*/ | |
1451 | U_GCB_EXTEND = 3, /*[EX]*/ | |
1452 | U_GCB_L = 4, /*[L]*/ | |
1453 | U_GCB_LF = 5, /*[LF]*/ | |
1454 | U_GCB_LV = 6, /*[LV]*/ | |
1455 | U_GCB_LVT = 7, /*[LVT]*/ | |
1456 | U_GCB_T = 8, /*[T]*/ | |
1457 | U_GCB_V = 9, /*[V]*/ | |
1458 | #endif /*U_HIDE_DRAFT_API*/ | |
1459 | U_GCB_COUNT = 10 | |
1460 | } UGraphemeClusterBreak; | |
1461 | ||
1462 | /** | |
1463 | * Word Break constants. | |
1464 | * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.) | |
1465 | * | |
1466 | * @see UCHAR_WORD_BREAK | |
1467 | * @draft ICU 3.4 | |
1468 | */ | |
1469 | typedef enum UWordBreakValues { | |
1470 | #ifndef U_HIDE_DRAFT_API | |
1471 | U_WB_OTHER = 0, /*[XX]*/ /*See note !!*/ | |
1472 | U_WB_ALETTER = 1, /*[LE]*/ | |
1473 | U_WB_FORMAT = 2, /*[FO]*/ | |
1474 | U_WB_KATAKANA = 3, /*[KA]*/ | |
1475 | U_WB_MIDLETTER = 4, /*[ML]*/ | |
1476 | U_WB_MIDNUM = 5, /*[MN]*/ | |
1477 | U_WB_NUMERIC = 6, /*[NU]*/ | |
1478 | U_WB_EXTENDNUMLET = 7, /*[EX]*/ | |
1479 | #endif /*U_HIDE_DRAFT_API*/ | |
1480 | U_WB_COUNT = 8 | |
1481 | } UWordBreakValues; | |
1482 | ||
1483 | /** | |
1484 | * Sentence Break constants. | |
1485 | * | |
1486 | * @see UCHAR_SENTENCE_BREAK | |
1487 | * @draft ICU 3.4 | |
1488 | */ | |
1489 | typedef enum USentenceBreak { | |
1490 | #ifndef U_HIDE_DRAFT_API | |
1491 | U_SB_OTHER = 0, /*[XX]*/ /*See note !!*/ | |
1492 | U_SB_ATERM = 1, /*[AT]*/ | |
1493 | U_SB_CLOSE = 2, /*[CL]*/ | |
1494 | U_SB_FORMAT = 3, /*[FO]*/ | |
1495 | U_SB_LOWER = 4, /*[LO]*/ | |
1496 | U_SB_NUMERIC = 5, /*[NU]*/ | |
1497 | U_SB_OLETTER = 6, /*[LE]*/ | |
1498 | U_SB_SEP = 7, /*[SE]*/ | |
1499 | U_SB_SP = 8, /*[SP]*/ | |
1500 | U_SB_STERM = 9, /*[ST]*/ | |
1501 | U_SB_UPPER = 10, /*[UP]*/ | |
1502 | #endif /*U_HIDE_DRAFT_API*/ | |
1503 | U_SB_COUNT = 11 | |
1504 | } USentenceBreak; | |
1505 | ||
b75a7d8f A |
1506 | /** |
1507 | * Line Break constants. | |
1508 | * | |
1509 | * @see UCHAR_LINE_BREAK | |
374ca955 | 1510 | * @stable ICU 2.2 |
b75a7d8f A |
1511 | */ |
1512 | typedef enum ULineBreak { | |
73c04bcf A |
1513 | U_LB_UNKNOWN = 0, /*[XX]*/ /*See note !!*/ |
1514 | U_LB_AMBIGUOUS = 1, /*[AI]*/ | |
1515 | U_LB_ALPHABETIC = 2, /*[AL]*/ | |
1516 | U_LB_BREAK_BOTH = 3, /*[B2]*/ | |
1517 | U_LB_BREAK_AFTER = 4, /*[BA]*/ | |
1518 | U_LB_BREAK_BEFORE = 5, /*[BB]*/ | |
1519 | U_LB_MANDATORY_BREAK = 6, /*[BK]*/ | |
1520 | U_LB_CONTINGENT_BREAK = 7, /*[CB]*/ | |
1521 | U_LB_CLOSE_PUNCTUATION = 8, /*[CL]*/ | |
1522 | U_LB_COMBINING_MARK = 9, /*[CM]*/ | |
1523 | U_LB_CARRIAGE_RETURN = 10, /*[CR]*/ | |
1524 | U_LB_EXCLAMATION = 11, /*[EX]*/ | |
1525 | U_LB_GLUE = 12, /*[GL]*/ | |
1526 | U_LB_HYPHEN = 13, /*[HY]*/ | |
1527 | U_LB_IDEOGRAPHIC = 14, /*[ID]*/ | |
1528 | U_LB_INSEPERABLE = 15, | |
1529 | /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0 @stable ICU 3.0 */ | |
374ca955 | 1530 | U_LB_INSEPARABLE=U_LB_INSEPERABLE,/*[IN]*/ |
73c04bcf A |
1531 | U_LB_INFIX_NUMERIC = 16, /*[IS]*/ |
1532 | U_LB_LINE_FEED = 17, /*[LF]*/ | |
1533 | U_LB_NONSTARTER = 18, /*[NS]*/ | |
1534 | U_LB_NUMERIC = 19, /*[NU]*/ | |
1535 | U_LB_OPEN_PUNCTUATION = 20, /*[OP]*/ | |
1536 | U_LB_POSTFIX_NUMERIC = 21, /*[PO]*/ | |
1537 | U_LB_PREFIX_NUMERIC = 22, /*[PR]*/ | |
1538 | U_LB_QUOTATION = 23, /*[QU]*/ | |
1539 | U_LB_COMPLEX_CONTEXT = 24, /*[SA]*/ | |
1540 | U_LB_SURROGATE = 25, /*[SG]*/ | |
1541 | U_LB_SPACE = 26, /*[SP]*/ | |
1542 | U_LB_BREAK_SYMBOLS = 27, /*[SY]*/ | |
1543 | U_LB_ZWSPACE = 28, /*[ZW]*/ | |
1544 | U_LB_NEXT_LINE = 29, /*[NL]*/ /* from here on: new in Unicode 4/ICU 2.6 */ | |
1545 | U_LB_WORD_JOINER = 30, /*[WJ]*/ | |
1546 | U_LB_H2 = 31, /*[H2]*/ /* from here on: new in Unicode 4.1/ICU 3.4 */ | |
1547 | U_LB_H3 = 32, /*[H3]*/ | |
1548 | U_LB_JL = 33, /*[JL]*/ | |
1549 | U_LB_JT = 34, /*[JT]*/ | |
1550 | U_LB_JV = 35, /*[JV]*/ | |
1551 | U_LB_COUNT = 36 | |
b75a7d8f A |
1552 | } ULineBreak; |
1553 | ||
1554 | /** | |
1555 | * Numeric Type constants. | |
1556 | * | |
1557 | * @see UCHAR_NUMERIC_TYPE | |
374ca955 | 1558 | * @stable ICU 2.2 |
b75a7d8f A |
1559 | */ |
1560 | typedef enum UNumericType { | |
1561 | U_NT_NONE, /*[None]*/ /*See note !!*/ | |
1562 | U_NT_DECIMAL, /*[de]*/ | |
1563 | U_NT_DIGIT, /*[di]*/ | |
1564 | U_NT_NUMERIC, /*[nu]*/ | |
1565 | U_NT_COUNT | |
1566 | } UNumericType; | |
1567 | ||
1568 | /** | |
1569 | * Hangul Syllable Type constants. | |
1570 | * | |
1571 | * @see UCHAR_HANGUL_SYLLABLE_TYPE | |
374ca955 | 1572 | * @stable ICU 2.6 |
b75a7d8f A |
1573 | */ |
1574 | typedef enum UHangulSyllableType { | |
1575 | U_HST_NOT_APPLICABLE, /*[NA]*/ /*See note !!*/ | |
1576 | U_HST_LEADING_JAMO, /*[L]*/ | |
1577 | U_HST_VOWEL_JAMO, /*[V]*/ | |
1578 | U_HST_TRAILING_JAMO, /*[T]*/ | |
1579 | U_HST_LV_SYLLABLE, /*[LV]*/ | |
1580 | U_HST_LVT_SYLLABLE, /*[LVT]*/ | |
1581 | U_HST_COUNT | |
1582 | } UHangulSyllableType; | |
1583 | ||
1584 | /** | |
1585 | * Check a binary Unicode property for a code point. | |
1586 | * | |
1587 | * Unicode, especially in version 3.2, defines many more properties than the | |
1588 | * original set in UnicodeData.txt. | |
1589 | * | |
1590 | * The properties APIs are intended to reflect Unicode properties as defined | |
1591 | * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). | |
1592 | * For details about the properties see http://www.unicode.org/ucd/ . | |
1593 | * For names of Unicode properties see the UCD file PropertyAliases.txt. | |
1594 | * | |
1595 | * Important: If ICU is built with UCD files from Unicode versions below 3.2, | |
1596 | * then properties marked with "new in Unicode 3.2" are not or not fully available. | |
1597 | * | |
1598 | * @param c Code point to test. | |
1599 | * @param which UProperty selector constant, identifies which binary property to check. | |
1600 | * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT. | |
1601 | * @return TRUE or FALSE according to the binary Unicode property value for c. | |
1602 | * Also FALSE if 'which' is out of bounds or if the Unicode version | |
1603 | * does not have data for the property at all, or not for this code point. | |
1604 | * | |
1605 | * @see UProperty | |
1606 | * @see u_getIntPropertyValue | |
1607 | * @see u_getUnicodeVersion | |
1608 | * @stable ICU 2.1 | |
1609 | */ | |
374ca955 | 1610 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1611 | u_hasBinaryProperty(UChar32 c, UProperty which); |
1612 | ||
1613 | /** | |
1614 | * Check if a code point has the Alphabetic Unicode property. | |
1615 | * Same as u_hasBinaryProperty(c, UCHAR_ALPHABETIC). | |
1616 | * This is different from u_isalpha! | |
1617 | * @param c Code point to test | |
1618 | * @return true if the code point has the Alphabetic Unicode property, false otherwise | |
1619 | * | |
1620 | * @see UCHAR_ALPHABETIC | |
1621 | * @see u_isalpha | |
1622 | * @see u_hasBinaryProperty | |
1623 | * @stable ICU 2.1 | |
1624 | */ | |
374ca955 | 1625 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1626 | u_isUAlphabetic(UChar32 c); |
1627 | ||
1628 | /** | |
1629 | * Check if a code point has the Lowercase Unicode property. | |
1630 | * Same as u_hasBinaryProperty(c, UCHAR_LOWERCASE). | |
1631 | * This is different from u_islower! | |
1632 | * @param c Code point to test | |
1633 | * @return true if the code point has the Lowercase Unicode property, false otherwise | |
1634 | * | |
1635 | * @see UCHAR_LOWERCASE | |
1636 | * @see u_islower | |
1637 | * @see u_hasBinaryProperty | |
1638 | * @stable ICU 2.1 | |
1639 | */ | |
374ca955 | 1640 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1641 | u_isULowercase(UChar32 c); |
1642 | ||
1643 | /** | |
1644 | * Check if a code point has the Uppercase Unicode property. | |
1645 | * Same as u_hasBinaryProperty(c, UCHAR_UPPERCASE). | |
1646 | * This is different from u_isupper! | |
1647 | * @param c Code point to test | |
1648 | * @return true if the code point has the Uppercase Unicode property, false otherwise | |
1649 | * | |
1650 | * @see UCHAR_UPPERCASE | |
1651 | * @see u_isupper | |
1652 | * @see u_hasBinaryProperty | |
1653 | * @stable ICU 2.1 | |
1654 | */ | |
374ca955 | 1655 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1656 | u_isUUppercase(UChar32 c); |
1657 | ||
1658 | /** | |
1659 | * Check if a code point has the White_Space Unicode property. | |
1660 | * Same as u_hasBinaryProperty(c, UCHAR_WHITE_SPACE). | |
1661 | * This is different from both u_isspace and u_isWhitespace! | |
1662 | * | |
1663 | * Note: There are several ICU whitespace functions; please see the uchar.h | |
1664 | * file documentation for a detailed comparison. | |
1665 | * | |
1666 | * @param c Code point to test | |
1667 | * @return true if the code point has the White_Space Unicode property, false otherwise. | |
1668 | * | |
1669 | * @see UCHAR_WHITE_SPACE | |
1670 | * @see u_isWhitespace | |
1671 | * @see u_isspace | |
1672 | * @see u_isJavaSpaceChar | |
1673 | * @see u_hasBinaryProperty | |
1674 | * @stable ICU 2.1 | |
1675 | */ | |
374ca955 | 1676 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1677 | u_isUWhiteSpace(UChar32 c); |
1678 | ||
1679 | /** | |
1680 | * Get the property value for an enumerated or integer Unicode property for a code point. | |
1681 | * Also returns binary and mask property values. | |
1682 | * | |
1683 | * Unicode, especially in version 3.2, defines many more properties than the | |
1684 | * original set in UnicodeData.txt. | |
1685 | * | |
1686 | * The properties APIs are intended to reflect Unicode properties as defined | |
1687 | * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). | |
1688 | * For details about the properties see http://www.unicode.org/ . | |
1689 | * For names of Unicode properties see the UCD file PropertyAliases.txt. | |
1690 | * | |
1691 | * Sample usage: | |
1692 | * UEastAsianWidth ea=(UEastAsianWidth)u_getIntPropertyValue(c, UCHAR_EAST_ASIAN_WIDTH); | |
1693 | * UBool b=(UBool)u_getIntPropertyValue(c, UCHAR_IDEOGRAPHIC); | |
1694 | * | |
1695 | * @param c Code point to test. | |
1696 | * @param which UProperty selector constant, identifies which property to check. | |
1697 | * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT | |
1698 | * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT | |
1699 | * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. | |
1700 | * @return Numeric value that is directly the property value or, | |
1701 | * for enumerated properties, corresponds to the numeric value of the enumerated | |
1702 | * constant of the respective property value enumeration type | |
1703 | * (cast to enum type if necessary). | |
1704 | * Returns 0 or 1 (for FALSE/TRUE) for binary Unicode properties. | |
1705 | * Returns a bit-mask for mask properties. | |
1706 | * Returns 0 if 'which' is out of bounds or if the Unicode version | |
1707 | * does not have data for the property at all, or not for this code point. | |
1708 | * | |
1709 | * @see UProperty | |
1710 | * @see u_hasBinaryProperty | |
1711 | * @see u_getIntPropertyMinValue | |
1712 | * @see u_getIntPropertyMaxValue | |
1713 | * @see u_getUnicodeVersion | |
374ca955 | 1714 | * @stable ICU 2.2 |
b75a7d8f | 1715 | */ |
374ca955 | 1716 | U_STABLE int32_t U_EXPORT2 |
b75a7d8f A |
1717 | u_getIntPropertyValue(UChar32 c, UProperty which); |
1718 | ||
1719 | /** | |
1720 | * Get the minimum value for an enumerated/integer/binary Unicode property. | |
1721 | * Can be used together with u_getIntPropertyMaxValue | |
1722 | * to allocate arrays of UnicodeSet or similar. | |
1723 | * | |
1724 | * @param which UProperty selector constant, identifies which binary property to check. | |
1725 | * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT | |
1726 | * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT. | |
1727 | * @return Minimum value returned by u_getIntPropertyValue for a Unicode property. | |
1728 | * 0 if the property selector is out of range. | |
1729 | * | |
1730 | * @see UProperty | |
1731 | * @see u_hasBinaryProperty | |
1732 | * @see u_getUnicodeVersion | |
1733 | * @see u_getIntPropertyMaxValue | |
1734 | * @see u_getIntPropertyValue | |
374ca955 | 1735 | * @stable ICU 2.2 |
b75a7d8f | 1736 | */ |
374ca955 | 1737 | U_STABLE int32_t U_EXPORT2 |
b75a7d8f A |
1738 | u_getIntPropertyMinValue(UProperty which); |
1739 | ||
1740 | /** | |
1741 | * Get the maximum value for an enumerated/integer/binary Unicode property. | |
1742 | * Can be used together with u_getIntPropertyMinValue | |
1743 | * to allocate arrays of UnicodeSet or similar. | |
1744 | * | |
1745 | * Examples for min/max values (for Unicode 3.2): | |
1746 | * | |
1747 | * - UCHAR_BIDI_CLASS: 0/18 (U_LEFT_TO_RIGHT/U_BOUNDARY_NEUTRAL) | |
1748 | * - UCHAR_SCRIPT: 0/45 (USCRIPT_COMMON/USCRIPT_TAGBANWA) | |
1749 | * - UCHAR_IDEOGRAPHIC: 0/1 (FALSE/TRUE) | |
1750 | * | |
1751 | * For undefined UProperty constant values, min/max values will be 0/-1. | |
1752 | * | |
1753 | * @param which UProperty selector constant, identifies which binary property to check. | |
1754 | * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT | |
1755 | * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT. | |
1756 | * @return Maximum value returned by u_getIntPropertyValue for a Unicode property. | |
1757 | * <=0 if the property selector is out of range. | |
1758 | * | |
1759 | * @see UProperty | |
1760 | * @see u_hasBinaryProperty | |
1761 | * @see u_getUnicodeVersion | |
1762 | * @see u_getIntPropertyMaxValue | |
1763 | * @see u_getIntPropertyValue | |
374ca955 | 1764 | * @stable ICU 2.2 |
b75a7d8f | 1765 | */ |
374ca955 | 1766 | U_STABLE int32_t U_EXPORT2 |
b75a7d8f A |
1767 | u_getIntPropertyMaxValue(UProperty which); |
1768 | ||
1769 | /** | |
1770 | * Get the numeric value for a Unicode code point as defined in the | |
1771 | * Unicode Character Database. | |
1772 | * | |
1773 | * A "double" return type is necessary because | |
1774 | * some numeric values are fractions, negative, or too large for int32_t. | |
1775 | * | |
1776 | * For characters without any numeric values in the Unicode Character Database, | |
1777 | * this function will return U_NO_NUMERIC_VALUE. | |
1778 | * | |
1779 | * Similar to java.lang.Character.getNumericValue(), but u_getNumericValue() | |
1780 | * also supports negative values, large values, and fractions, | |
1781 | * while Java's getNumericValue() returns values 10..35 for ASCII letters. | |
1782 | * | |
1783 | * @param c Code point to get the numeric value for. | |
1784 | * @return Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined. | |
1785 | * | |
1786 | * @see U_NO_NUMERIC_VALUE | |
374ca955 | 1787 | * @stable ICU 2.2 |
b75a7d8f | 1788 | */ |
374ca955 | 1789 | U_STABLE double U_EXPORT2 |
b75a7d8f A |
1790 | u_getNumericValue(UChar32 c); |
1791 | ||
1792 | /** | |
1793 | * Special value that is returned by u_getNumericValue when | |
1794 | * no numeric value is defined for a code point. | |
1795 | * | |
1796 | * @see u_getNumericValue | |
374ca955 | 1797 | * @stable ICU 2.2 |
b75a7d8f A |
1798 | */ |
1799 | #define U_NO_NUMERIC_VALUE ((double)-123456789.) | |
1800 | ||
1801 | /** | |
1802 | * Determines whether the specified code point has the general category "Ll" | |
1803 | * (lowercase letter). | |
1804 | * | |
1805 | * Same as java.lang.Character.isLowerCase(). | |
1806 | * | |
1807 | * This misses some characters that are also lowercase but | |
1808 | * have a different general category value. | |
1809 | * In order to include those, use UCHAR_LOWERCASE. | |
1810 | * | |
1811 | * In addition to being equivalent to a Java function, this also serves | |
1812 | * as a C/POSIX migration function. | |
1813 | * See the comments about C/POSIX character classification functions in the | |
1814 | * documentation at the top of this header file. | |
1815 | * | |
1816 | * @param c the code point to be tested | |
1817 | * @return TRUE if the code point is an Ll lowercase letter | |
1818 | * | |
1819 | * @see UCHAR_LOWERCASE | |
1820 | * @see u_isupper | |
1821 | * @see u_istitle | |
b75a7d8f A |
1822 | * @stable ICU 2.0 |
1823 | */ | |
374ca955 | 1824 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1825 | u_islower(UChar32 c); |
1826 | ||
1827 | /** | |
1828 | * Determines whether the specified code point has the general category "Lu" | |
1829 | * (uppercase letter). | |
1830 | * | |
1831 | * Same as java.lang.Character.isUpperCase(). | |
1832 | * | |
1833 | * This misses some characters that are also uppercase but | |
1834 | * have a different general category value. | |
1835 | * In order to include those, use UCHAR_UPPERCASE. | |
1836 | * | |
1837 | * In addition to being equivalent to a Java function, this also serves | |
1838 | * as a C/POSIX migration function. | |
1839 | * See the comments about C/POSIX character classification functions in the | |
1840 | * documentation at the top of this header file. | |
1841 | * | |
1842 | * @param c the code point to be tested | |
1843 | * @return TRUE if the code point is an Lu uppercase letter | |
1844 | * | |
1845 | * @see UCHAR_UPPERCASE | |
1846 | * @see u_islower | |
1847 | * @see u_istitle | |
1848 | * @see u_tolower | |
1849 | * @stable ICU 2.0 | |
1850 | */ | |
374ca955 | 1851 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1852 | u_isupper(UChar32 c); |
1853 | ||
1854 | /** | |
1855 | * Determines whether the specified code point is a titlecase letter. | |
1856 | * True for general category "Lt" (titlecase letter). | |
1857 | * | |
1858 | * Same as java.lang.Character.isTitleCase(). | |
1859 | * | |
1860 | * @param c the code point to be tested | |
1861 | * @return TRUE if the code point is an Lt titlecase letter | |
1862 | * | |
1863 | * @see u_isupper | |
1864 | * @see u_islower | |
1865 | * @see u_totitle | |
1866 | * @stable ICU 2.0 | |
1867 | */ | |
374ca955 | 1868 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1869 | u_istitle(UChar32 c); |
1870 | ||
1871 | /** | |
1872 | * Determines whether the specified code point is a digit character according to Java. | |
1873 | * True for characters with general category "Nd" (decimal digit numbers). | |
1874 | * Beginning with Unicode 4, this is the same as | |
1875 | * testing for the Numeric_Type of Decimal. | |
1876 | * | |
1877 | * Same as java.lang.Character.isDigit(). | |
1878 | * | |
1879 | * In addition to being equivalent to a Java function, this also serves | |
1880 | * as a C/POSIX migration function. | |
1881 | * See the comments about C/POSIX character classification functions in the | |
1882 | * documentation at the top of this header file. | |
1883 | * | |
1884 | * @param c the code point to be tested | |
1885 | * @return TRUE if the code point is a digit character according to Character.isDigit() | |
1886 | * | |
1887 | * @stable ICU 2.0 | |
1888 | */ | |
374ca955 | 1889 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1890 | u_isdigit(UChar32 c); |
1891 | ||
1892 | /** | |
1893 | * Determines whether the specified code point is a letter character. | |
1894 | * True for general categories "L" (letters). | |
1895 | * | |
1896 | * Same as java.lang.Character.isLetter(). | |
1897 | * | |
1898 | * In addition to being equivalent to a Java function, this also serves | |
1899 | * as a C/POSIX migration function. | |
1900 | * See the comments about C/POSIX character classification functions in the | |
1901 | * documentation at the top of this header file. | |
1902 | * | |
1903 | * @param c the code point to be tested | |
1904 | * @return TRUE if the code point is a letter character | |
1905 | * | |
1906 | * @see u_isdigit | |
1907 | * @see u_isalnum | |
1908 | * @stable ICU 2.0 | |
1909 | */ | |
374ca955 | 1910 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1911 | u_isalpha(UChar32 c); |
1912 | ||
1913 | /** | |
1914 | * Determines whether the specified code point is an alphanumeric character | |
1915 | * (letter or digit) according to Java. | |
1916 | * True for characters with general categories | |
1917 | * "L" (letters) and "Nd" (decimal digit numbers). | |
1918 | * | |
1919 | * Same as java.lang.Character.isLetterOrDigit(). | |
1920 | * | |
1921 | * In addition to being equivalent to a Java function, this also serves | |
1922 | * as a C/POSIX migration function. | |
1923 | * See the comments about C/POSIX character classification functions in the | |
1924 | * documentation at the top of this header file. | |
1925 | * | |
1926 | * @param c the code point to be tested | |
1927 | * @return TRUE if the code point is an alphanumeric character according to Character.isLetterOrDigit() | |
1928 | * | |
1929 | * @stable ICU 2.0 | |
1930 | */ | |
374ca955 | 1931 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1932 | u_isalnum(UChar32 c); |
1933 | ||
1934 | /** | |
1935 | * Determines whether the specified code point is a hexadecimal digit. | |
1936 | * This is equivalent to u_digit(c, 16)>=0. | |
1937 | * True for characters with general category "Nd" (decimal digit numbers) | |
1938 | * as well as Latin letters a-f and A-F in both ASCII and Fullwidth ASCII. | |
1939 | * (That is, for letters with code points | |
1940 | * 0041..0046, 0061..0066, FF21..FF26, FF41..FF46.) | |
1941 | * | |
1942 | * In order to narrow the definition of hexadecimal digits to only ASCII | |
1943 | * characters, use (c<=0x7f && u_isxdigit(c)). | |
1944 | * | |
1945 | * This is a C/POSIX migration function. | |
1946 | * See the comments about C/POSIX character classification functions in the | |
1947 | * documentation at the top of this header file. | |
1948 | * | |
1949 | * @param c the code point to be tested | |
1950 | * @return TRUE if the code point is a hexadecimal digit | |
1951 | * | |
374ca955 | 1952 | * @stable ICU 2.6 |
b75a7d8f | 1953 | */ |
374ca955 | 1954 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1955 | u_isxdigit(UChar32 c); |
1956 | ||
1957 | /** | |
1958 | * Determines whether the specified code point is a punctuation character. | |
1959 | * True for characters with general categories "P" (punctuation). | |
1960 | * | |
1961 | * This is a C/POSIX migration function. | |
1962 | * See the comments about C/POSIX character classification functions in the | |
1963 | * documentation at the top of this header file. | |
1964 | * | |
1965 | * @param c the code point to be tested | |
1966 | * @return TRUE if the code point is a punctuation character | |
1967 | * | |
374ca955 | 1968 | * @stable ICU 2.6 |
b75a7d8f | 1969 | */ |
374ca955 | 1970 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1971 | u_ispunct(UChar32 c); |
1972 | ||
1973 | /** | |
1974 | * Determines whether the specified code point is a "graphic" character | |
1975 | * (printable, excluding spaces). | |
1976 | * TRUE for all characters except those with general categories | |
1977 | * "Cc" (control codes), "Cf" (format controls), "Cs" (surrogates), | |
1978 | * "Cn" (unassigned), and "Z" (separators). | |
1979 | * | |
1980 | * This is a C/POSIX migration function. | |
1981 | * See the comments about C/POSIX character classification functions in the | |
1982 | * documentation at the top of this header file. | |
1983 | * | |
1984 | * @param c the code point to be tested | |
1985 | * @return TRUE if the code point is a "graphic" character | |
1986 | * | |
374ca955 | 1987 | * @stable ICU 2.6 |
b75a7d8f | 1988 | */ |
374ca955 | 1989 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
1990 | u_isgraph(UChar32 c); |
1991 | ||
1992 | /** | |
1993 | * Determines whether the specified code point is a "blank" or "horizontal space", | |
1994 | * a character that visibly separates words on a line. | |
1995 | * The following are equivalent definitions: | |
1996 | * | |
1997 | * TRUE for Unicode White_Space characters except for "vertical space controls" | |
1998 | * where "vertical space controls" are the following characters: | |
1999 | * U+000A (LF) U+000B (VT) U+000C (FF) U+000D (CR) U+0085 (NEL) U+2028 (LS) U+2029 (PS) | |
2000 | * | |
2001 | * same as | |
2002 | * | |
2003 | * TRUE for U+0009 (TAB) and characters with general category "Zs" (space separators) | |
2004 | * except Zero Width Space (ZWSP, U+200B). | |
2005 | * | |
2006 | * Note: There are several ICU whitespace functions; please see the uchar.h | |
2007 | * file documentation for a detailed comparison. | |
2008 | * | |
2009 | * This is a C/POSIX migration function. | |
2010 | * See the comments about C/POSIX character classification functions in the | |
2011 | * documentation at the top of this header file. | |
2012 | * | |
2013 | * @param c the code point to be tested | |
2014 | * @return TRUE if the code point is a "blank" | |
2015 | * | |
374ca955 | 2016 | * @stable ICU 2.6 |
b75a7d8f | 2017 | */ |
374ca955 | 2018 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2019 | u_isblank(UChar32 c); |
2020 | ||
2021 | /** | |
2022 | * Determines whether the specified code point is "defined", | |
2023 | * which usually means that it is assigned a character. | |
2024 | * True for general categories other than "Cn" (other, not assigned), | |
2025 | * i.e., true for all code points mentioned in UnicodeData.txt. | |
2026 | * | |
2027 | * Note that non-character code points (e.g., U+FDD0) are not "defined" | |
2028 | * (they are Cn), but surrogate code points are "defined" (Cs). | |
2029 | * | |
2030 | * Same as java.lang.Character.isDefined(). | |
2031 | * | |
2032 | * @param c the code point to be tested | |
2033 | * @return TRUE if the code point is assigned a character | |
2034 | * | |
2035 | * @see u_isdigit | |
2036 | * @see u_isalpha | |
2037 | * @see u_isalnum | |
2038 | * @see u_isupper | |
2039 | * @see u_islower | |
2040 | * @see u_istitle | |
2041 | * @stable ICU 2.0 | |
2042 | */ | |
374ca955 | 2043 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2044 | u_isdefined(UChar32 c); |
2045 | ||
2046 | /** | |
2047 | * Determines if the specified character is a space character or not. | |
2048 | * | |
2049 | * Note: There are several ICU whitespace functions; please see the uchar.h | |
2050 | * file documentation for a detailed comparison. | |
2051 | * | |
2052 | * This is a C/POSIX migration function. | |
2053 | * See the comments about C/POSIX character classification functions in the | |
2054 | * documentation at the top of this header file. | |
2055 | * | |
2056 | * @param c the character to be tested | |
2057 | * @return true if the character is a space character; false otherwise. | |
2058 | * | |
2059 | * @see u_isJavaSpaceChar | |
2060 | * @see u_isWhitespace | |
2061 | * @see u_isUWhiteSpace | |
2062 | * @stable ICU 2.0 | |
2063 | */ | |
374ca955 | 2064 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2065 | u_isspace(UChar32 c); |
2066 | ||
2067 | /** | |
2068 | * Determine if the specified code point is a space character according to Java. | |
2069 | * True for characters with general categories "Z" (separators), | |
2070 | * which does not include control codes (e.g., TAB or Line Feed). | |
2071 | * | |
2072 | * Same as java.lang.Character.isSpaceChar(). | |
2073 | * | |
2074 | * Note: There are several ICU whitespace functions; please see the uchar.h | |
2075 | * file documentation for a detailed comparison. | |
2076 | * | |
2077 | * @param c the code point to be tested | |
2078 | * @return TRUE if the code point is a space character according to Character.isSpaceChar() | |
2079 | * | |
2080 | * @see u_isspace | |
2081 | * @see u_isWhitespace | |
2082 | * @see u_isUWhiteSpace | |
374ca955 | 2083 | * @stable ICU 2.6 |
b75a7d8f | 2084 | */ |
374ca955 | 2085 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2086 | u_isJavaSpaceChar(UChar32 c); |
2087 | ||
2088 | /** | |
2089 | * Determines if the specified code point is a whitespace character according to Java/ICU. | |
2090 | * A character is considered to be a Java whitespace character if and only | |
2091 | * if it satisfies one of the following criteria: | |
2092 | * | |
2093 | * - It is a Unicode separator (categories "Z"), but is not | |
2094 | * a no-break space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP). | |
2095 | * - It is U+0009 HORIZONTAL TABULATION. | |
2096 | * - It is U+000A LINE FEED. | |
2097 | * - It is U+000B VERTICAL TABULATION. | |
2098 | * - It is U+000C FORM FEED. | |
2099 | * - It is U+000D CARRIAGE RETURN. | |
2100 | * - It is U+001C FILE SEPARATOR. | |
2101 | * - It is U+001D GROUP SEPARATOR. | |
2102 | * - It is U+001E RECORD SEPARATOR. | |
2103 | * - It is U+001F UNIT SEPARATOR. | |
2104 | * - It is U+0085 NEXT LINE. | |
2105 | * | |
2106 | * Same as java.lang.Character.isWhitespace() except that Java omits U+0085. | |
2107 | * | |
2108 | * Note: There are several ICU whitespace functions; please see the uchar.h | |
2109 | * file documentation for a detailed comparison. | |
2110 | * | |
2111 | * @param c the code point to be tested | |
2112 | * @return TRUE if the code point is a whitespace character according to Java/ICU | |
2113 | * | |
2114 | * @see u_isspace | |
2115 | * @see u_isJavaSpaceChar | |
2116 | * @see u_isUWhiteSpace | |
2117 | * @stable ICU 2.0 | |
2118 | */ | |
374ca955 | 2119 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2120 | u_isWhitespace(UChar32 c); |
2121 | ||
2122 | /** | |
2123 | * Determines whether the specified code point is a control character | |
2124 | * (as defined by this function). | |
2125 | * A control character is one of the following: | |
2126 | * - ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f) | |
2127 | * - U_CONTROL_CHAR (Cc) | |
2128 | * - U_FORMAT_CHAR (Cf) | |
2129 | * - U_LINE_SEPARATOR (Zl) | |
2130 | * - U_PARAGRAPH_SEPARATOR (Zp) | |
2131 | * | |
2132 | * This is a C/POSIX migration function. | |
2133 | * See the comments about C/POSIX character classification functions in the | |
2134 | * documentation at the top of this header file. | |
2135 | * | |
2136 | * @param c the code point to be tested | |
2137 | * @return TRUE if the code point is a control character | |
2138 | * | |
2139 | * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT | |
2140 | * @see u_isprint | |
2141 | * @stable ICU 2.0 | |
2142 | */ | |
374ca955 | 2143 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2144 | u_iscntrl(UChar32 c); |
2145 | ||
2146 | /** | |
2147 | * Determines whether the specified code point is an ISO control code. | |
2148 | * True for U+0000..U+001f and U+007f..U+009f (general category "Cc"). | |
2149 | * | |
2150 | * Same as java.lang.Character.isISOControl(). | |
2151 | * | |
2152 | * @param c the code point to be tested | |
2153 | * @return TRUE if the code point is an ISO control code | |
2154 | * | |
2155 | * @see u_iscntrl | |
374ca955 | 2156 | * @stable ICU 2.6 |
b75a7d8f | 2157 | */ |
374ca955 | 2158 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2159 | u_isISOControl(UChar32 c); |
2160 | ||
2161 | /** | |
2162 | * Determines whether the specified code point is a printable character. | |
2163 | * True for general categories <em>other</em> than "C" (controls). | |
2164 | * | |
2165 | * This is a C/POSIX migration function. | |
2166 | * See the comments about C/POSIX character classification functions in the | |
2167 | * documentation at the top of this header file. | |
2168 | * | |
2169 | * @param c the code point to be tested | |
2170 | * @return TRUE if the code point is a printable character | |
2171 | * | |
2172 | * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT | |
2173 | * @see u_iscntrl | |
2174 | * @stable ICU 2.0 | |
2175 | */ | |
374ca955 | 2176 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2177 | u_isprint(UChar32 c); |
2178 | ||
2179 | /** | |
2180 | * Determines whether the specified code point is a base character. | |
2181 | * True for general categories "L" (letters), "N" (numbers), | |
2182 | * "Mc" (spacing combining marks), and "Me" (enclosing marks). | |
2183 | * | |
2184 | * Note that this is different from the Unicode definition in | |
2185 | * chapter 3.5, conformance clause D13, | |
2186 | * which defines base characters to be all characters (not Cn) | |
2187 | * that do not graphically combine with preceding characters (M) | |
2188 | * and that are neither control (Cc) or format (Cf) characters. | |
2189 | * | |
2190 | * @param c the code point to be tested | |
2191 | * @return TRUE if the code point is a base character according to this function | |
2192 | * | |
2193 | * @see u_isalpha | |
2194 | * @see u_isdigit | |
2195 | * @stable ICU 2.0 | |
2196 | */ | |
374ca955 | 2197 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2198 | u_isbase(UChar32 c); |
2199 | ||
2200 | /** | |
2201 | * Returns the bidirectional category value for the code point, | |
2202 | * which is used in the Unicode bidirectional algorithm | |
2203 | * (UAX #9 http://www.unicode.org/reports/tr9/). | |
2204 | * Note that some <em>unassigned</em> code points have bidi values | |
2205 | * of R or AL because they are in blocks that are reserved | |
2206 | * for Right-To-Left scripts. | |
2207 | * | |
2208 | * Same as java.lang.Character.getDirectionality() | |
2209 | * | |
2210 | * @param c the code point to be tested | |
2211 | * @return the bidirectional category (UCharDirection) value | |
2212 | * | |
2213 | * @see UCharDirection | |
2214 | * @stable ICU 2.0 | |
2215 | */ | |
374ca955 | 2216 | U_STABLE UCharDirection U_EXPORT2 |
b75a7d8f A |
2217 | u_charDirection(UChar32 c); |
2218 | ||
2219 | /** | |
2220 | * Determines whether the code point has the Bidi_Mirrored property. | |
2221 | * This property is set for characters that are commonly used in | |
2222 | * Right-To-Left contexts and need to be displayed with a "mirrored" | |
2223 | * glyph. | |
2224 | * | |
2225 | * Same as java.lang.Character.isMirrored(). | |
2226 | * Same as UCHAR_BIDI_MIRRORED | |
2227 | * | |
2228 | * @param c the code point to be tested | |
2229 | * @return TRUE if the character has the Bidi_Mirrored property | |
2230 | * | |
2231 | * @see UCHAR_BIDI_MIRRORED | |
2232 | * @stable ICU 2.0 | |
2233 | */ | |
374ca955 | 2234 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2235 | u_isMirrored(UChar32 c); |
2236 | ||
2237 | /** | |
2238 | * Maps the specified character to a "mirror-image" character. | |
2239 | * For characters with the Bidi_Mirrored property, implementations | |
2240 | * sometimes need a "poor man's" mapping to another Unicode | |
2241 | * character (code point) such that the default glyph may serve | |
2242 | * as the mirror-image of the default glyph of the specified | |
2243 | * character. This is useful for text conversion to and from | |
2244 | * codepages with visual order, and for displays without glyph | |
2245 | * selecetion capabilities. | |
2246 | * | |
2247 | * @param c the code point to be mapped | |
2248 | * @return another Unicode code point that may serve as a mirror-image | |
2249 | * substitute, or c itself if there is no such mapping or c | |
2250 | * does not have the Bidi_Mirrored property | |
2251 | * | |
2252 | * @see UCHAR_BIDI_MIRRORED | |
2253 | * @see u_isMirrored | |
2254 | * @stable ICU 2.0 | |
2255 | */ | |
374ca955 | 2256 | U_STABLE UChar32 U_EXPORT2 |
b75a7d8f A |
2257 | u_charMirror(UChar32 c); |
2258 | ||
2259 | /** | |
2260 | * Returns the general category value for the code point. | |
2261 | * | |
2262 | * Same as java.lang.Character.getType(). | |
2263 | * | |
2264 | * @param c the code point to be tested | |
2265 | * @return the general category (UCharCategory) value | |
2266 | * | |
2267 | * @see UCharCategory | |
2268 | * @stable ICU 2.0 | |
2269 | */ | |
374ca955 | 2270 | U_STABLE int8_t U_EXPORT2 |
b75a7d8f A |
2271 | u_charType(UChar32 c); |
2272 | ||
2273 | /** | |
2274 | * Get a single-bit bit set for the general category of a character. | |
2275 | * This bit set can be compared bitwise with U_GC_SM_MASK, U_GC_L_MASK, etc. | |
2276 | * Same as U_MASK(u_charType(c)). | |
2277 | * | |
2278 | * @param c the code point to be tested | |
2279 | * @return a single-bit mask corresponding to the general category (UCharCategory) value | |
2280 | * | |
2281 | * @see u_charType | |
2282 | * @see UCharCategory | |
2283 | * @see U_GC_CN_MASK | |
2284 | * @stable ICU 2.1 | |
2285 | */ | |
2286 | #define U_GET_GC_MASK(c) U_MASK(u_charType(c)) | |
2287 | ||
2288 | /** | |
2289 | * Callback from u_enumCharTypes(), is called for each contiguous range | |
2290 | * of code points c (where start<=c<limit) | |
2291 | * with the same Unicode general category ("character type"). | |
2292 | * | |
2293 | * The callback function can stop the enumeration by returning FALSE. | |
2294 | * | |
2295 | * @param context an opaque pointer, as passed into utrie_enum() | |
2296 | * @param start the first code point in a contiguous range with value | |
2297 | * @param limit one past the last code point in a contiguous range with value | |
2298 | * @param type the general category for all code points in [start..limit[ | |
2299 | * @return FALSE to stop the enumeration | |
2300 | * | |
2301 | * @stable ICU 2.1 | |
2302 | * @see UCharCategory | |
2303 | * @see u_enumCharTypes | |
2304 | */ | |
2305 | typedef UBool U_CALLCONV | |
2306 | UCharEnumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory type); | |
2307 | ||
2308 | /** | |
2309 | * Enumerate efficiently all code points with their Unicode general categories. | |
2310 | * | |
2311 | * This is useful for building data structures (e.g., UnicodeSet's), | |
2312 | * for enumerating all assigned code points (type!=U_UNASSIGNED), etc. | |
2313 | * | |
2314 | * For each contiguous range of code points with a given general category ("character type"), | |
2315 | * the UCharEnumTypeRange function is called. | |
2316 | * Adjacent ranges have different types. | |
2317 | * The Unicode Standard guarantees that the numeric value of the type is 0..31. | |
2318 | * | |
2319 | * @param enumRange a pointer to a function that is called for each contiguous range | |
2320 | * of code points with the same general category | |
2321 | * @param context an opaque pointer that is passed on to the callback function | |
2322 | * | |
2323 | * @stable ICU 2.1 | |
2324 | * @see UCharCategory | |
2325 | * @see UCharEnumTypeRange | |
2326 | */ | |
374ca955 | 2327 | U_STABLE void U_EXPORT2 |
b75a7d8f A |
2328 | u_enumCharTypes(UCharEnumTypeRange *enumRange, const void *context); |
2329 | ||
2330 | #if !UCONFIG_NO_NORMALIZATION | |
2331 | ||
2332 | /** | |
2333 | * Returns the combining class of the code point as specified in UnicodeData.txt. | |
2334 | * | |
2335 | * @param c the code point of the character | |
2336 | * @return the combining class of the character | |
2337 | * @stable ICU 2.0 | |
2338 | */ | |
374ca955 | 2339 | U_STABLE uint8_t U_EXPORT2 |
b75a7d8f A |
2340 | u_getCombiningClass(UChar32 c); |
2341 | ||
2342 | #endif | |
2343 | ||
2344 | /** | |
2345 | * Returns the decimal digit value of a decimal digit character. | |
2346 | * Such characters have the general category "Nd" (decimal digit numbers) | |
2347 | * and a Numeric_Type of Decimal. | |
2348 | * | |
2349 | * Unlike ICU releases before 2.6, no digit values are returned for any | |
2350 | * Han characters because Han number characters are often used with a special | |
2351 | * Chinese-style number format (with characters for powers of 10 in between) | |
2352 | * instead of in decimal-positional notation. | |
2353 | * Unicode 4 explicitly assigns Han number characters the Numeric_Type | |
2354 | * Numeric instead of Decimal. | |
2355 | * See Jitterbug 1483 for more details. | |
2356 | * | |
2357 | * Use u_getIntPropertyValue(c, UCHAR_NUMERIC_TYPE) and u_getNumericValue() | |
2358 | * for complete numeric Unicode properties. | |
2359 | * | |
2360 | * @param c the code point for which to get the decimal digit value | |
2361 | * @return the decimal digit value of c, | |
2362 | * or -1 if c is not a decimal digit character | |
2363 | * | |
2364 | * @see u_getNumericValue | |
2365 | * @stable ICU 2.0 | |
2366 | */ | |
374ca955 | 2367 | U_STABLE int32_t U_EXPORT2 |
b75a7d8f A |
2368 | u_charDigitValue(UChar32 c); |
2369 | ||
2370 | /** | |
2371 | * Returns the Unicode allocation block that contains the character. | |
2372 | * | |
2373 | * @param c the code point to be tested | |
2374 | * @return the block value (UBlockCode) for c | |
2375 | * | |
2376 | * @see UBlockCode | |
2377 | * @stable ICU 2.0 | |
2378 | */ | |
374ca955 | 2379 | U_STABLE UBlockCode U_EXPORT2 |
b75a7d8f A |
2380 | ublock_getCode(UChar32 c); |
2381 | ||
2382 | /** | |
2383 | * Retrieve the name of a Unicode character. | |
2384 | * Depending on <code>nameChoice</code>, the character name written | |
2385 | * into the buffer is the "modern" name or the name that was defined | |
2386 | * in Unicode version 1.0. | |
2387 | * The name contains only "invariant" characters | |
2388 | * like A-Z, 0-9, space, and '-'. | |
2389 | * Unicode 1.0 names are only retrieved if they are different from the modern | |
2390 | * names and if the data file contains the data for them. gennames may or may | |
2391 | * not be called with a command line option to include 1.0 names in unames.dat. | |
2392 | * | |
2393 | * @param code The character (code point) for which to get the name. | |
2394 | * It must be <code>0<=code<=0x10ffff</code>. | |
2395 | * @param nameChoice Selector for which name to get. | |
2396 | * @param buffer Destination address for copying the name. | |
2397 | * The name will always be zero-terminated. | |
2398 | * If there is no name, then the buffer will be set to the empty string. | |
2399 | * @param bufferLength <code>==sizeof(buffer)</code> | |
2400 | * @param pErrorCode Pointer to a UErrorCode variable; | |
2401 | * check for <code>U_SUCCESS()</code> after <code>u_charName()</code> | |
2402 | * returns. | |
2403 | * @return The length of the name, or 0 if there is no name for this character. | |
2404 | * If the bufferLength is less than or equal to the length, then the buffer | |
2405 | * contains the truncated name and the returned length indicates the full | |
2406 | * length of the name. | |
2407 | * The length does not include the zero-termination. | |
2408 | * | |
2409 | * @see UCharNameChoice | |
2410 | * @see u_charFromName | |
2411 | * @see u_enumCharNames | |
2412 | * @stable ICU 2.0 | |
2413 | */ | |
374ca955 | 2414 | U_STABLE int32_t U_EXPORT2 |
b75a7d8f A |
2415 | u_charName(UChar32 code, UCharNameChoice nameChoice, |
2416 | char *buffer, int32_t bufferLength, | |
2417 | UErrorCode *pErrorCode); | |
2418 | ||
2419 | /** | |
2420 | * Get the ISO 10646 comment for a character. | |
2421 | * The ISO 10646 comment is an informative field in the Unicode Character | |
2422 | * Database (UnicodeData.txt field 11) and is from the ISO 10646 names list. | |
2423 | * | |
2424 | * @param c The character (code point) for which to get the ISO comment. | |
2425 | * It must be <code>0<=c<=0x10ffff</code>. | |
2426 | * @param dest Destination address for copying the comment. | |
2427 | * The comment will be zero-terminated if possible. | |
2428 | * If there is no comment, then the buffer will be set to the empty string. | |
2429 | * @param destCapacity <code>==sizeof(dest)</code> | |
2430 | * @param pErrorCode Pointer to a UErrorCode variable; | |
2431 | * check for <code>U_SUCCESS()</code> after <code>u_getISOComment()</code> | |
2432 | * returns. | |
2433 | * @return The length of the comment, or 0 if there is no comment for this character. | |
2434 | * If the destCapacity is less than or equal to the length, then the buffer | |
2435 | * contains the truncated name and the returned length indicates the full | |
2436 | * length of the name. | |
2437 | * The length does not include the zero-termination. | |
2438 | * | |
374ca955 | 2439 | * @stable ICU 2.2 |
b75a7d8f | 2440 | */ |
374ca955 | 2441 | U_STABLE int32_t U_EXPORT2 |
b75a7d8f A |
2442 | u_getISOComment(UChar32 c, |
2443 | char *dest, int32_t destCapacity, | |
2444 | UErrorCode *pErrorCode); | |
2445 | ||
2446 | /** | |
2447 | * Find a Unicode character by its name and return its code point value. | |
2448 | * The name is matched exactly and completely. | |
2449 | * If the name does not correspond to a code point, <i>pErrorCode</i> | |
2450 | * is set to <code>U_INVALID_CHAR_FOUND</code>. | |
2451 | * A Unicode 1.0 name is matched only if it differs from the modern name. | |
2452 | * Unicode names are all uppercase. Extended names are lowercase followed | |
2453 | * by an uppercase hexadecimal number, and within angle brackets. | |
2454 | * | |
2455 | * @param nameChoice Selector for which name to match. | |
2456 | * @param name The name to match. | |
2457 | * @param pErrorCode Pointer to a UErrorCode variable | |
2458 | * @return The Unicode value of the code point with the given name, | |
2459 | * or an undefined value if there is no such code point. | |
2460 | * | |
2461 | * @see UCharNameChoice | |
2462 | * @see u_charName | |
2463 | * @see u_enumCharNames | |
2464 | * @stable ICU 1.7 | |
2465 | */ | |
374ca955 | 2466 | U_STABLE UChar32 U_EXPORT2 |
b75a7d8f A |
2467 | u_charFromName(UCharNameChoice nameChoice, |
2468 | const char *name, | |
2469 | UErrorCode *pErrorCode); | |
2470 | ||
2471 | /** | |
2472 | * Type of a callback function for u_enumCharNames() that gets called | |
2473 | * for each Unicode character with the code point value and | |
2474 | * the character name. | |
2475 | * If such a function returns FALSE, then the enumeration is stopped. | |
2476 | * | |
2477 | * @param context The context pointer that was passed to u_enumCharNames(). | |
2478 | * @param code The Unicode code point for the character with this name. | |
2479 | * @param nameChoice Selector for which kind of names is enumerated. | |
2480 | * @param name The character's name, zero-terminated. | |
2481 | * @param length The length of the name. | |
2482 | * @return TRUE if the enumeration should continue, FALSE to stop it. | |
2483 | * | |
2484 | * @see UCharNameChoice | |
2485 | * @see u_enumCharNames | |
2486 | * @stable ICU 1.7 | |
2487 | */ | |
73c04bcf | 2488 | typedef UBool U_CALLCONV UEnumCharNamesFn(void *context, |
b75a7d8f A |
2489 | UChar32 code, |
2490 | UCharNameChoice nameChoice, | |
2491 | const char *name, | |
2492 | int32_t length); | |
2493 | ||
2494 | /** | |
2495 | * Enumerate all assigned Unicode characters between the start and limit | |
2496 | * code points (start inclusive, limit exclusive) and call a function | |
2497 | * for each, passing the code point value and the character name. | |
2498 | * For Unicode 1.0 names, only those are enumerated that differ from the | |
2499 | * modern names. | |
2500 | * | |
2501 | * @param start The first code point in the enumeration range. | |
2502 | * @param limit One more than the last code point in the enumeration range | |
2503 | * (the first one after the range). | |
2504 | * @param fn The function that is to be called for each character name. | |
2505 | * @param context An arbitrary pointer that is passed to the function. | |
2506 | * @param nameChoice Selector for which kind of names to enumerate. | |
2507 | * @param pErrorCode Pointer to a UErrorCode variable | |
2508 | * | |
2509 | * @see UCharNameChoice | |
2510 | * @see UEnumCharNamesFn | |
2511 | * @see u_charName | |
2512 | * @see u_charFromName | |
2513 | * @stable ICU 1.7 | |
2514 | */ | |
374ca955 | 2515 | U_STABLE void U_EXPORT2 |
b75a7d8f A |
2516 | u_enumCharNames(UChar32 start, UChar32 limit, |
2517 | UEnumCharNamesFn *fn, | |
2518 | void *context, | |
2519 | UCharNameChoice nameChoice, | |
2520 | UErrorCode *pErrorCode); | |
2521 | ||
2522 | /** | |
2523 | * Return the Unicode name for a given property, as given in the | |
2524 | * Unicode database file PropertyAliases.txt. | |
2525 | * | |
2526 | * In addition, this function maps the property | |
2527 | * UCHAR_GENERAL_CATEGORY_MASK to the synthetic names "gcm" / | |
2528 | * "General_Category_Mask". These names are not in | |
2529 | * PropertyAliases.txt. | |
2530 | * | |
2531 | * @param property UProperty selector other than UCHAR_INVALID_CODE. | |
2532 | * If out of range, NULL is returned. | |
2533 | * | |
2534 | * @param nameChoice selector for which name to get. If out of range, | |
2535 | * NULL is returned. All properties have a long name. Most | |
2536 | * have a short name, but some do not. Unicode allows for | |
2537 | * additional names; if present these will be returned by | |
2538 | * U_LONG_PROPERTY_NAME + i, where i=1, 2,... | |
2539 | * | |
2540 | * @return a pointer to the name, or NULL if either the | |
2541 | * property or the nameChoice is out of range. If a given | |
2542 | * nameChoice returns NULL, then all larger values of | |
2543 | * nameChoice will return NULL, with one exception: if NULL is | |
2544 | * returned for U_SHORT_PROPERTY_NAME, then | |
2545 | * U_LONG_PROPERTY_NAME (and higher) may still return a | |
2546 | * non-NULL value. The returned pointer is valid until | |
2547 | * u_cleanup() is called. | |
2548 | * | |
2549 | * @see UProperty | |
2550 | * @see UPropertyNameChoice | |
374ca955 | 2551 | * @stable ICU 2.4 |
b75a7d8f | 2552 | */ |
374ca955 | 2553 | U_STABLE const char* U_EXPORT2 |
b75a7d8f A |
2554 | u_getPropertyName(UProperty property, |
2555 | UPropertyNameChoice nameChoice); | |
2556 | ||
2557 | /** | |
2558 | * Return the UProperty enum for a given property name, as specified | |
2559 | * in the Unicode database file PropertyAliases.txt. Short, long, and | |
2560 | * any other variants are recognized. | |
2561 | * | |
2562 | * In addition, this function maps the synthetic names "gcm" / | |
2563 | * "General_Category_Mask" to the property | |
2564 | * UCHAR_GENERAL_CATEGORY_MASK. These names are not in | |
2565 | * PropertyAliases.txt. | |
2566 | * | |
2567 | * @param alias the property name to be matched. The name is compared | |
2568 | * using "loose matching" as described in PropertyAliases.txt. | |
2569 | * | |
2570 | * @return a UProperty enum, or UCHAR_INVALID_CODE if the given name | |
2571 | * does not match any property. | |
2572 | * | |
2573 | * @see UProperty | |
374ca955 | 2574 | * @stable ICU 2.4 |
b75a7d8f | 2575 | */ |
374ca955 | 2576 | U_STABLE UProperty U_EXPORT2 |
b75a7d8f A |
2577 | u_getPropertyEnum(const char* alias); |
2578 | ||
2579 | /** | |
2580 | * Return the Unicode name for a given property value, as given in the | |
2581 | * Unicode database file PropertyValueAliases.txt. | |
2582 | * | |
2583 | * Note: Some of the names in PropertyValueAliases.txt can only be | |
2584 | * retrieved using UCHAR_GENERAL_CATEGORY_MASK, not | |
2585 | * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" / | |
2586 | * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P" | |
2587 | * / "Punctuation", "S" / "Symbol", and "Z" / "Separator". | |
2588 | * | |
2589 | * @param property UProperty selector constant. | |
2590 | * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT | |
2591 | * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT | |
2592 | * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. | |
2593 | * If out of range, NULL is returned. | |
2594 | * | |
2595 | * @param value selector for a value for the given property. If out | |
2596 | * of range, NULL is returned. In general, valid values range | |
2597 | * from 0 up to some maximum. There are a few exceptions: | |
2598 | * (1.) UCHAR_BLOCK values begin at the non-zero value | |
2599 | * UBLOCK_BASIC_LATIN. (2.) UCHAR_CANONICAL_COMBINING_CLASS | |
2600 | * values are not contiguous and range from 0..240. (3.) | |
2601 | * UCHAR_GENERAL_CATEGORY_MASK values are not values of | |
2602 | * UCharCategory, but rather mask values produced by | |
2603 | * U_GET_GC_MASK(). This allows grouped categories such as | |
2604 | * [:L:] to be represented. Mask values range | |
2605 | * non-contiguously from 1..U_GC_P_MASK. | |
2606 | * | |
2607 | * @param nameChoice selector for which name to get. If out of range, | |
2608 | * NULL is returned. All values have a long name. Most have | |
2609 | * a short name, but some do not. Unicode allows for | |
2610 | * additional names; if present these will be returned by | |
2611 | * U_LONG_PROPERTY_NAME + i, where i=1, 2,... | |
2612 | ||
2613 | * @return a pointer to the name, or NULL if either the | |
2614 | * property or the nameChoice is out of range. If a given | |
2615 | * nameChoice returns NULL, then all larger values of | |
2616 | * nameChoice will return NULL, with one exception: if NULL is | |
2617 | * returned for U_SHORT_PROPERTY_NAME, then | |
2618 | * U_LONG_PROPERTY_NAME (and higher) may still return a | |
2619 | * non-NULL value. The returned pointer is valid until | |
2620 | * u_cleanup() is called. | |
2621 | * | |
2622 | * @see UProperty | |
2623 | * @see UPropertyNameChoice | |
374ca955 | 2624 | * @stable ICU 2.4 |
b75a7d8f | 2625 | */ |
374ca955 | 2626 | U_STABLE const char* U_EXPORT2 |
b75a7d8f A |
2627 | u_getPropertyValueName(UProperty property, |
2628 | int32_t value, | |
2629 | UPropertyNameChoice nameChoice); | |
2630 | ||
2631 | /** | |
2632 | * Return the property value integer for a given value name, as | |
2633 | * specified in the Unicode database file PropertyValueAliases.txt. | |
2634 | * Short, long, and any other variants are recognized. | |
2635 | * | |
2636 | * Note: Some of the names in PropertyValueAliases.txt will only be | |
2637 | * recognized with UCHAR_GENERAL_CATEGORY_MASK, not | |
2638 | * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" / | |
2639 | * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P" | |
2640 | * / "Punctuation", "S" / "Symbol", and "Z" / "Separator". | |
2641 | * | |
2642 | * @param property UProperty selector constant. | |
2643 | * Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT | |
2644 | * or UCHAR_INT_START<=which<UCHAR_INT_LIMIT | |
2645 | * or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. | |
2646 | * If out of range, UCHAR_INVALID_CODE is returned. | |
2647 | * | |
2648 | * @param alias the value name to be matched. The name is compared | |
2649 | * using "loose matching" as described in | |
2650 | * PropertyValueAliases.txt. | |
2651 | * | |
2652 | * @return a value integer or UCHAR_INVALID_CODE if the given name | |
2653 | * does not match any value of the given property, or if the | |
2654 | * property is invalid. Note: U CHAR_GENERAL_CATEGORY values | |
2655 | * are not values of UCharCategory, but rather mask values | |
2656 | * produced by U_GET_GC_MASK(). This allows grouped | |
2657 | * categories such as [:L:] to be represented. | |
2658 | * | |
2659 | * @see UProperty | |
374ca955 | 2660 | * @stable ICU 2.4 |
b75a7d8f | 2661 | */ |
374ca955 | 2662 | U_STABLE int32_t U_EXPORT2 |
b75a7d8f A |
2663 | u_getPropertyValueEnum(UProperty property, |
2664 | const char* alias); | |
2665 | ||
2666 | /** | |
2667 | * Determines if the specified character is permissible as the | |
2668 | * first character in an identifier according to Unicode | |
2669 | * (The Unicode Standard, Version 3.0, chapter 5.16 Identifiers). | |
2670 | * True for characters with general categories "L" (letters) and "Nl" (letter numbers). | |
2671 | * | |
2672 | * Same as java.lang.Character.isUnicodeIdentifierStart(). | |
2673 | * Same as UCHAR_ID_START | |
2674 | * | |
2675 | * @param c the code point to be tested | |
2676 | * @return TRUE if the code point may start an identifier | |
2677 | * | |
2678 | * @see UCHAR_ID_START | |
2679 | * @see u_isalpha | |
2680 | * @see u_isIDPart | |
2681 | * @stable ICU 2.0 | |
2682 | */ | |
374ca955 | 2683 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2684 | u_isIDStart(UChar32 c); |
2685 | ||
2686 | /** | |
2687 | * Determines if the specified character is permissible | |
2688 | * in an identifier according to Java. | |
2689 | * True for characters with general categories "L" (letters), | |
2690 | * "Nl" (letter numbers), "Nd" (decimal digits), | |
2691 | * "Mc" and "Mn" (combining marks), "Pc" (connecting punctuation), and | |
2692 | * u_isIDIgnorable(c). | |
2693 | * | |
2694 | * Same as java.lang.Character.isUnicodeIdentifierPart(). | |
2695 | * Almost the same as Unicode's ID_Continue (UCHAR_ID_CONTINUE) | |
2696 | * except that Unicode recommends to ignore Cf which is less than | |
2697 | * u_isIDIgnorable(c). | |
2698 | * | |
2699 | * @param c the code point to be tested | |
2700 | * @return TRUE if the code point may occur in an identifier according to Java | |
2701 | * | |
2702 | * @see UCHAR_ID_CONTINUE | |
2703 | * @see u_isIDStart | |
2704 | * @see u_isIDIgnorable | |
2705 | * @stable ICU 2.0 | |
2706 | */ | |
374ca955 | 2707 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2708 | u_isIDPart(UChar32 c); |
2709 | ||
2710 | /** | |
2711 | * Determines if the specified character should be regarded | |
2712 | * as an ignorable character in an identifier, | |
2713 | * according to Java. | |
2714 | * True for characters with general category "Cf" (format controls) as well as | |
2715 | * non-whitespace ISO controls | |
2716 | * (U+0000..U+0008, U+000E..U+001B, U+007F..U+0084, U+0086..U+009F). | |
2717 | * | |
2718 | * Same as java.lang.Character.isIdentifierIgnorable() | |
2719 | * except that Java also returns TRUE for U+0085 Next Line | |
2720 | * (it omits U+0085 from whitespace ISO controls). | |
2721 | * | |
2722 | * Note that Unicode just recommends to ignore Cf (format controls). | |
2723 | * | |
2724 | * @param c the code point to be tested | |
2725 | * @return TRUE if the code point is ignorable in identifiers according to Java | |
2726 | * | |
2727 | * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT | |
2728 | * @see u_isIDStart | |
2729 | * @see u_isIDPart | |
2730 | * @stable ICU 2.0 | |
2731 | */ | |
374ca955 | 2732 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2733 | u_isIDIgnorable(UChar32 c); |
2734 | ||
2735 | /** | |
2736 | * Determines if the specified character is permissible as the | |
2737 | * first character in a Java identifier. | |
2738 | * In addition to u_isIDStart(c), true for characters with | |
2739 | * general categories "Sc" (currency symbols) and "Pc" (connecting punctuation). | |
2740 | * | |
2741 | * Same as java.lang.Character.isJavaIdentifierStart(). | |
2742 | * | |
2743 | * @param c the code point to be tested | |
2744 | * @return TRUE if the code point may start a Java identifier | |
2745 | * | |
2746 | * @see u_isJavaIDPart | |
2747 | * @see u_isalpha | |
2748 | * @see u_isIDStart | |
2749 | * @stable ICU 2.0 | |
2750 | */ | |
374ca955 | 2751 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2752 | u_isJavaIDStart(UChar32 c); |
2753 | ||
2754 | /** | |
2755 | * Determines if the specified character is permissible | |
2756 | * in a Java identifier. | |
2757 | * In addition to u_isIDPart(c), true for characters with | |
2758 | * general category "Sc" (currency symbols). | |
2759 | * | |
2760 | * Same as java.lang.Character.isJavaIdentifierPart(). | |
2761 | * | |
2762 | * @param c the code point to be tested | |
2763 | * @return TRUE if the code point may occur in a Java identifier | |
2764 | * | |
2765 | * @see u_isIDIgnorable | |
2766 | * @see u_isJavaIDStart | |
2767 | * @see u_isalpha | |
2768 | * @see u_isdigit | |
2769 | * @see u_isIDPart | |
2770 | * @stable ICU 2.0 | |
2771 | */ | |
374ca955 | 2772 | U_STABLE UBool U_EXPORT2 |
b75a7d8f A |
2773 | u_isJavaIDPart(UChar32 c); |
2774 | ||
2775 | /** | |
2776 | * The given character is mapped to its lowercase equivalent according to | |
2777 | * UnicodeData.txt; if the character has no lowercase equivalent, the character | |
2778 | * itself is returned. | |
2779 | * | |
2780 | * Same as java.lang.Character.toLowerCase(). | |
2781 | * | |
2782 | * This function only returns the simple, single-code point case mapping. | |
73c04bcf A |
2783 | * Full case mappings should be used whenever possible because they produce |
2784 | * better results by working on whole strings. | |
2785 | * They take into account the string context and the language and can map | |
2786 | * to a result string with a different length as appropriate. | |
b75a7d8f A |
2787 | * Full case mappings are applied by the string case mapping functions, |
2788 | * see ustring.h and the UnicodeString class. | |
73c04bcf A |
2789 | * See also the User Guide chapter on C/POSIX migration: |
2790 | * http://icu.sourceforge.net/userguide/posix.html#case_mappings | |
b75a7d8f A |
2791 | * |
2792 | * @param c the code point to be mapped | |
2793 | * @return the Simple_Lowercase_Mapping of the code point, if any; | |
2794 | * otherwise the code point itself. | |
2795 | * @stable ICU 2.0 | |
2796 | */ | |
374ca955 | 2797 | U_STABLE UChar32 U_EXPORT2 |
b75a7d8f A |
2798 | u_tolower(UChar32 c); |
2799 | ||
2800 | /** | |
2801 | * The given character is mapped to its uppercase equivalent according to UnicodeData.txt; | |
2802 | * if the character has no uppercase equivalent, the character itself is | |
2803 | * returned. | |
2804 | * | |
2805 | * Same as java.lang.Character.toUpperCase(). | |
2806 | * | |
2807 | * This function only returns the simple, single-code point case mapping. | |
73c04bcf A |
2808 | * Full case mappings should be used whenever possible because they produce |
2809 | * better results by working on whole strings. | |
2810 | * They take into account the string context and the language and can map | |
2811 | * to a result string with a different length as appropriate. | |
b75a7d8f A |
2812 | * Full case mappings are applied by the string case mapping functions, |
2813 | * see ustring.h and the UnicodeString class. | |
73c04bcf A |
2814 | * See also the User Guide chapter on C/POSIX migration: |
2815 | * http://icu.sourceforge.net/userguide/posix.html#case_mappings | |
b75a7d8f A |
2816 | * |
2817 | * @param c the code point to be mapped | |
2818 | * @return the Simple_Uppercase_Mapping of the code point, if any; | |
2819 | * otherwise the code point itself. | |
2820 | * @stable ICU 2.0 | |
2821 | */ | |
374ca955 | 2822 | U_STABLE UChar32 U_EXPORT2 |
b75a7d8f A |
2823 | u_toupper(UChar32 c); |
2824 | ||
2825 | /** | |
2826 | * The given character is mapped to its titlecase equivalent | |
2827 | * according to UnicodeData.txt; | |
2828 | * if none is defined, the character itself is returned. | |
2829 | * | |
2830 | * Same as java.lang.Character.toTitleCase(). | |
2831 | * | |
2832 | * This function only returns the simple, single-code point case mapping. | |
73c04bcf A |
2833 | * Full case mappings should be used whenever possible because they produce |
2834 | * better results by working on whole strings. | |
2835 | * They take into account the string context and the language and can map | |
2836 | * to a result string with a different length as appropriate. | |
b75a7d8f A |
2837 | * Full case mappings are applied by the string case mapping functions, |
2838 | * see ustring.h and the UnicodeString class. | |
73c04bcf A |
2839 | * See also the User Guide chapter on C/POSIX migration: |
2840 | * http://icu.sourceforge.net/userguide/posix.html#case_mappings | |
b75a7d8f A |
2841 | * |
2842 | * @param c the code point to be mapped | |
2843 | * @return the Simple_Titlecase_Mapping of the code point, if any; | |
2844 | * otherwise the code point itself. | |
2845 | * @stable ICU 2.0 | |
2846 | */ | |
374ca955 | 2847 | U_STABLE UChar32 U_EXPORT2 |
b75a7d8f A |
2848 | u_totitle(UChar32 c); |
2849 | ||
2850 | /** Option value for case folding: use default mappings defined in CaseFolding.txt. @stable ICU 2.0 */ | |
2851 | #define U_FOLD_CASE_DEFAULT 0 | |
2852 | ||
2853 | /** | |
2854 | * Option value for case folding: | |
2855 | * | |
2856 | * Use the modified set of mappings provided in CaseFolding.txt to handle dotted I | |
2857 | * and dotless i appropriately for Turkic languages (tr, az). | |
2858 | * | |
2859 | * Before Unicode 3.2, CaseFolding.txt contains mappings marked with 'I' that | |
2860 | * are to be included for default mappings and | |
2861 | * excluded for the Turkic-specific mappings. | |
2862 | * | |
2863 | * Unicode 3.2 CaseFolding.txt instead contains mappings marked with 'T' that | |
2864 | * are to be excluded for default mappings and | |
2865 | * included for the Turkic-specific mappings. | |
2866 | * | |
2867 | * @stable ICU 2.0 | |
2868 | */ | |
2869 | #define U_FOLD_CASE_EXCLUDE_SPECIAL_I 1 | |
2870 | ||
2871 | /** | |
2872 | * The given character is mapped to its case folding equivalent according to | |
2873 | * UnicodeData.txt and CaseFolding.txt; | |
2874 | * if the character has no case folding equivalent, the character | |
2875 | * itself is returned. | |
2876 | * | |
2877 | * This function only returns the simple, single-code point case mapping. | |
73c04bcf A |
2878 | * Full case mappings should be used whenever possible because they produce |
2879 | * better results by working on whole strings. | |
2880 | * They take into account the string context and the language and can map | |
2881 | * to a result string with a different length as appropriate. | |
b75a7d8f A |
2882 | * Full case mappings are applied by the string case mapping functions, |
2883 | * see ustring.h and the UnicodeString class. | |
73c04bcf A |
2884 | * See also the User Guide chapter on C/POSIX migration: |
2885 | * http://icu.sourceforge.net/userguide/posix.html#case_mappings | |
b75a7d8f A |
2886 | * |
2887 | * @param c the code point to be mapped | |
2888 | * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I | |
2889 | * @return the Simple_Case_Folding of the code point, if any; | |
2890 | * otherwise the code point itself. | |
2891 | * @stable ICU 2.0 | |
2892 | */ | |
374ca955 | 2893 | U_STABLE UChar32 U_EXPORT2 |
b75a7d8f A |
2894 | u_foldCase(UChar32 c, uint32_t options); |
2895 | ||
2896 | /** | |
2897 | * Returns the decimal digit value of the code point in the | |
2898 | * specified radix. | |
2899 | * | |
2900 | * If the radix is not in the range <code>2<=radix<=36</code> or if the | |
2901 | * value of <code>c</code> is not a valid digit in the specified | |
2902 | * radix, <code>-1</code> is returned. A character is a valid digit | |
2903 | * if at least one of the following is true: | |
2904 | * <ul> | |
2905 | * <li>The character has a decimal digit value. | |
2906 | * Such characters have the general category "Nd" (decimal digit numbers) | |
2907 | * and a Numeric_Type of Decimal. | |
2908 | * In this case the value is the character's decimal digit value.</li> | |
2909 | * <li>The character is one of the uppercase Latin letters | |
2910 | * <code>'A'</code> through <code>'Z'</code>. | |
2911 | * In this case the value is <code>c-'A'+10</code>.</li> | |
2912 | * <li>The character is one of the lowercase Latin letters | |
2913 | * <code>'a'</code> through <code>'z'</code>. | |
2914 | * In this case the value is <code>ch-'a'+10</code>.</li> | |
2915 | * <li>Latin letters from both the ASCII range (0061..007A, 0041..005A) | |
2916 | * as well as from the Fullwidth ASCII range (FF41..FF5A, FF21..FF3A) | |
2917 | * are recognized.</li> | |
2918 | * </ul> | |
2919 | * | |
2920 | * Same as java.lang.Character.digit(). | |
2921 | * | |
2922 | * @param ch the code point to be tested. | |
2923 | * @param radix the radix. | |
2924 | * @return the numeric value represented by the character in the | |
2925 | * specified radix, | |
2926 | * or -1 if there is no value or if the value exceeds the radix. | |
2927 | * | |
2928 | * @see UCHAR_NUMERIC_TYPE | |
2929 | * @see u_forDigit | |
2930 | * @see u_charDigitValue | |
2931 | * @see u_isdigit | |
2932 | * @stable ICU 2.0 | |
2933 | */ | |
374ca955 | 2934 | U_STABLE int32_t U_EXPORT2 |
b75a7d8f A |
2935 | u_digit(UChar32 ch, int8_t radix); |
2936 | ||
2937 | /** | |
2938 | * Determines the character representation for a specific digit in | |
2939 | * the specified radix. If the value of <code>radix</code> is not a | |
2940 | * valid radix, or the value of <code>digit</code> is not a valid | |
2941 | * digit in the specified radix, the null character | |
2942 | * (<code>U+0000</code>) is returned. | |
2943 | * <p> | |
2944 | * The <code>radix</code> argument is valid if it is greater than or | |
2945 | * equal to 2 and less than or equal to 36. | |
2946 | * The <code>digit</code> argument is valid if | |
2947 | * <code>0 <= digit < radix</code>. | |
2948 | * <p> | |
2949 | * If the digit is less than 10, then | |
2950 | * <code>'0' + digit</code> is returned. Otherwise, the value | |
2951 | * <code>'a' + digit - 10</code> is returned. | |
2952 | * | |
2953 | * Same as java.lang.Character.forDigit(). | |
2954 | * | |
2955 | * @param digit the number to convert to a character. | |
2956 | * @param radix the radix. | |
2957 | * @return the <code>char</code> representation of the specified digit | |
2958 | * in the specified radix. | |
2959 | * | |
2960 | * @see u_digit | |
2961 | * @see u_charDigitValue | |
2962 | * @see u_isdigit | |
2963 | * @stable ICU 2.0 | |
2964 | */ | |
374ca955 | 2965 | U_STABLE UChar32 U_EXPORT2 |
b75a7d8f A |
2966 | u_forDigit(int32_t digit, int8_t radix); |
2967 | ||
2968 | /** | |
2969 | * Get the "age" of the code point. | |
2970 | * The "age" is the Unicode version when the code point was first | |
2971 | * designated (as a non-character or for Private Use) | |
2972 | * or assigned a character. | |
2973 | * This can be useful to avoid emitting code points to receiving | |
2974 | * processes that do not accept newer characters. | |
2975 | * The data is from the UCD file DerivedAge.txt. | |
2976 | * | |
2977 | * @param c The code point. | |
2978 | * @param versionArray The Unicode version number array, to be filled in. | |
2979 | * | |
2980 | * @stable ICU 2.1 | |
2981 | */ | |
374ca955 | 2982 | U_STABLE void U_EXPORT2 |
b75a7d8f A |
2983 | u_charAge(UChar32 c, UVersionInfo versionArray); |
2984 | ||
2985 | /** | |
2986 | * Gets the Unicode version information. | |
2987 | * The version array is filled in with the version information | |
2988 | * for the Unicode standard that is currently used by ICU. | |
2989 | * For example, Unicode version 3.1.1 is represented as an array with | |
2990 | * the values { 3, 1, 1, 0 }. | |
2991 | * | |
2992 | * @param versionArray an output array that will be filled in with | |
2993 | * the Unicode version number | |
2994 | * @stable ICU 2.0 | |
2995 | */ | |
374ca955 | 2996 | U_STABLE void U_EXPORT2 |
b75a7d8f A |
2997 | u_getUnicodeVersion(UVersionInfo versionArray); |
2998 | ||
2999 | /** | |
3000 | * Get the FC_NFKC_Closure property string for a character. | |
3001 | * See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure" | |
3002 | * or for "FNC": http://www.unicode.org/reports/tr15/ | |
3003 | * | |
3004 | * @param c The character (code point) for which to get the FC_NFKC_Closure string. | |
3005 | * It must be <code>0<=c<=0x10ffff</code>. | |
3006 | * @param dest Destination address for copying the string. | |
3007 | * The string will be zero-terminated if possible. | |
3008 | * If there is no FC_NFKC_Closure string, | |
3009 | * then the buffer will be set to the empty string. | |
3010 | * @param destCapacity <code>==sizeof(dest)</code> | |
3011 | * @param pErrorCode Pointer to a UErrorCode variable. | |
3012 | * @return The length of the string, or 0 if there is no FC_NFKC_Closure string for this character. | |
3013 | * If the destCapacity is less than or equal to the length, then the buffer | |
3014 | * contains the truncated name and the returned length indicates the full | |
3015 | * length of the name. | |
3016 | * The length does not include the zero-termination. | |
3017 | * | |
374ca955 | 3018 | * @stable ICU 2.2 |
b75a7d8f | 3019 | */ |
374ca955 | 3020 | U_STABLE int32_t U_EXPORT2 |
b75a7d8f A |
3021 | u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode); |
3022 | ||
3023 | U_CDECL_END | |
3024 | ||
3025 | #endif /*_UCHAR*/ | |
3026 | /*eof*/ |