2 **********************************************************************
3 * Copyright (C) 1997-2006, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
9 * Modification History:
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 ******************************************************************************
26 #include "unicode/utypes.h"
30 /*==========================================================================*/
31 /* Unicode version number */
32 /*==========================================================================*/
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.
39 * @see u_getUnicodeVersion
42 #define U_UNICODE_VERSION "5.0"
46 * \brief C API: Unicode Properties
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.
52 * Unicode assigns each code point (not just assigned character) values for
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.
57 * For more information see
58 * "About the Unicode Character Database" (http://www.unicode.org/ucd/)
59 * and the ICU User Guide chapter on Properties (http://icu.sourceforge.net/userguide/properties.html).
61 * Many functions are designed to match java.lang.Character functions.
62 * See the individual function documentation,
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
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.
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.
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).
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)
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.
104 * The C/POSIX character classes are also available in UnicodeSet patterns,
105 * using patterns like [:graph:] or \p{graph}.
108 * Note: There are several ICU whitespace functions.
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
123 /** The lowest Unicode code point value. Code points are non-negative. @stable ICU 2.0 */
124 #define UCHAR_MIN_VALUE 0
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.
134 #define UCHAR_MAX_VALUE 0x10ffff
137 * Get a single-bit bit set (a flag) from a bit number 0..31.
140 #define U_MASK(x) ((uint32_t)1<<(x))
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.
148 * Any comment of the form "/ *[name]* /" (spaces added) is such
151 * The U_JG_* and U_GC_*_MASK constants are matched by their symbolic
152 * name, which must match PropertyValueAliases.txt.
156 * Selection constants for Unicode properties.
157 * These constants are used in functions like u_hasBinaryProperty to select
158 * one of the Unicode properties.
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.
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.
169 * @see u_hasBinaryProperty
170 * @see u_getIntPropertyValue
171 * @see u_getUnicodeVersion
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. */
179 /* Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that
180 debuggers display UCHAR_ALPHABETIC as the symbolic name for 0,
181 rather than UCHAR_BINARY_START. Likewise for other *_START
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 */
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 */
190 UCHAR_ASCII_HEX_DIGIT
=1,
191 /** Binary property Bidi_Control.
192 Format controls which have specific functions
193 in the Bidi Algorithm. @stable ICU 2.1 */
194 UCHAR_BIDI_CONTROL
=2,
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 */
199 UCHAR_BIDI_MIRRORED
=3,
200 /** Binary property Dash. Variations of dashes. @stable ICU 2.1 */
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 */
205 UCHAR_DEFAULT_IGNORABLE_CODE_POINT
=5,
206 /** Binary property Deprecated (new in Unicode 3.2).
207 The usage of deprecated characters is strongly discouraged. @stable ICU 2.1 */
209 /** Binary property Diacritic. Characters that linguistically modify
210 the meaning of another character to which they apply. @stable ICU 2.1 */
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 */
216 /** Binary property Full_Composition_Exclusion.
217 CompositionExclusions.txt+Singleton Decompositions+
218 Non-Starter Decompositions. @stable ICU 2.1 */
219 UCHAR_FULL_COMPOSITION_EXCLUSION
=9,
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 */
223 UCHAR_GRAPHEME_BASE
=10,
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 */
227 UCHAR_GRAPHEME_EXTEND
=11,
228 /** Binary property Grapheme_Link (new in Unicode 3.2).
229 For programmatic determination of grapheme cluster boundaries. @stable ICU 2.1 */
230 UCHAR_GRAPHEME_LINK
=12,
231 /** Binary property Hex_Digit.
232 Characters commonly used for hexadecimal numbers. @stable ICU 2.1 */
234 /** Binary property Hyphen. Dashes used to mark connections
235 between pieces of words, plus the Katakana middle dot. @stable ICU 2.1 */
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 */
241 UCHAR_ID_CONTINUE
=15,
242 /** Binary property ID_Start.
243 Characters that can start an identifier.
244 Lu+Ll+Lt+Lm+Lo+Nl @stable ICU 2.1 */
246 /** Binary property Ideographic.
247 CJKV ideographs. @stable ICU 2.1 */
248 UCHAR_IDEOGRAPHIC
=17,
249 /** Binary property IDS_Binary_Operator (new in Unicode 3.2).
250 For programmatic determination of
251 Ideographic Description Sequences. @stable ICU 2.1 */
252 UCHAR_IDS_BINARY_OPERATOR
=18,
253 /** Binary property IDS_Trinary_Operator (new in Unicode 3.2).
254 For programmatic determination of
255 Ideographic Description Sequences. @stable ICU 2.1 */
256 UCHAR_IDS_TRINARY_OPERATOR
=19,
257 /** Binary property Join_Control.
258 Format controls for cursive joining and ligation. @stable ICU 2.1 */
259 UCHAR_JOIN_CONTROL
=20,
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 */
263 UCHAR_LOGICAL_ORDER_EXCEPTION
=21,
264 /** Binary property Lowercase. Same as u_isULowercase, different from u_islower.
265 Ll+Other_Lowercase @stable ICU 2.1 */
267 /** Binary property Math. Sm+Other_Math @stable ICU 2.1 */
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 */
272 UCHAR_NONCHARACTER_CODE_POINT
=24,
273 /** Binary property Quotation_Mark. @stable ICU 2.1 */
274 UCHAR_QUOTATION_MARK
=25,
275 /** Binary property Radical (new in Unicode 3.2).
276 For programmatic determination of
277 Ideographic Description Sequences. @stable ICU 2.1 */
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 */
283 UCHAR_SOFT_DOTTED
=27,
284 /** Binary property Terminal_Punctuation.
285 Punctuation characters that generally mark
286 the end of textual units. @stable ICU 2.1 */
287 UCHAR_TERMINAL_PUNCTUATION
=28,
288 /** Binary property Unified_Ideograph (new in Unicode 3.2).
289 For programmatic determination of
290 Ideographic Description Sequences. @stable ICU 2.1 */
291 UCHAR_UNIFIED_IDEOGRAPH
=29,
292 /** Binary property Uppercase. Same as u_isUUppercase, different from u_isupper.
293 Lu+Other_Uppercase @stable ICU 2.1 */
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 */
298 UCHAR_WHITE_SPACE
=31,
299 /** Binary property XID_Continue.
300 ID_Continue modified to allow closure under
301 normalization forms NFKC and NFKD. @stable ICU 2.1 */
302 UCHAR_XID_CONTINUE
=32,
303 /** Binary property XID_Start. ID_Start modified to allow
304 closure under normalization forms NFKC and NFKD. @stable ICU 2.1 */
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
308 the general category Cased_Letter. @stable ICU 2.6 */
309 UCHAR_CASE_SENSITIVE
=34,
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/)
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.
320 UCHAR_VARIATION_SELECTOR
=36,
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
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.
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
340 See also com.ibm.text.UCD.NFSkippable in the ICU4J repository,
341 and icu/source/common/unormimp.h .
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
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
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
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.
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/)
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/)
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.
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.
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.
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.
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.
417 UCHAR_POSIX_XDIGIT
=48,
418 #endif /* U_HIDE_DRAFT_API */
419 /** One more than the last constant for binary Unicode properties. @stable ICU 2.1 */
420 UCHAR_BINARY_LIMIT
=49,
422 /** Enumerated property Bidi_Class.
423 Same as u_charDirection, returns UCharDirection values. @stable ICU 2.2 */
424 UCHAR_BIDI_CLASS
=0x1000,
425 /** First constant for enumerated/integer Unicode properties. @stable ICU 2.2 */
426 UCHAR_INT_START
=UCHAR_BIDI_CLASS
,
427 /** Enumerated property Block.
428 Same as ublock_getCode, returns UBlockCode values. @stable ICU 2.2 */
430 /** Enumerated property Canonical_Combining_Class.
431 Same as u_getCombiningClass, returns 8-bit numeric values. @stable ICU 2.2 */
432 UCHAR_CANONICAL_COMBINING_CLASS
=0x1002,
433 /** Enumerated property Decomposition_Type.
434 Returns UDecompositionType values. @stable ICU 2.2 */
435 UCHAR_DECOMPOSITION_TYPE
=0x1003,
436 /** Enumerated property East_Asian_Width.
437 See http://www.unicode.org/reports/tr11/
438 Returns UEastAsianWidth values. @stable ICU 2.2 */
439 UCHAR_EAST_ASIAN_WIDTH
=0x1004,
440 /** Enumerated property General_Category.
441 Same as u_charType, returns UCharCategory values. @stable ICU 2.2 */
442 UCHAR_GENERAL_CATEGORY
=0x1005,
443 /** Enumerated property Joining_Group.
444 Returns UJoiningGroup values. @stable ICU 2.2 */
445 UCHAR_JOINING_GROUP
=0x1006,
446 /** Enumerated property Joining_Type.
447 Returns UJoiningType values. @stable ICU 2.2 */
448 UCHAR_JOINING_TYPE
=0x1007,
449 /** Enumerated property Line_Break.
450 Returns ULineBreak values. @stable ICU 2.2 */
451 UCHAR_LINE_BREAK
=0x1008,
452 /** Enumerated property Numeric_Type.
453 Returns UNumericType values. @stable ICU 2.2 */
454 UCHAR_NUMERIC_TYPE
=0x1009,
455 /** Enumerated property Script.
456 Same as uscript_getScript, returns UScriptCode values. @stable ICU 2.2 */
458 /** Enumerated property Hangul_Syllable_Type, new in Unicode 4.
459 Returns UHangulSyllableType values. @stable ICU 2.6 */
460 UCHAR_HANGUL_SYLLABLE_TYPE
=0x100B,
461 /** Enumerated property NFD_Quick_Check.
462 Returns UNormalizationCheckResult values. @stable ICU 3.0 */
463 UCHAR_NFD_QUICK_CHECK
=0x100C,
464 /** Enumerated property NFKD_Quick_Check.
465 Returns UNormalizationCheckResult values. @stable ICU 3.0 */
466 UCHAR_NFKD_QUICK_CHECK
=0x100D,
467 /** Enumerated property NFC_Quick_Check.
468 Returns UNormalizationCheckResult values. @stable ICU 3.0 */
469 UCHAR_NFC_QUICK_CHECK
=0x100E,
470 /** Enumerated property NFKC_Quick_Check.
471 Returns UNormalizationCheckResult values. @stable ICU 3.0 */
472 UCHAR_NFKC_QUICK_CHECK
=0x100F,
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 .
478 Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */
479 UCHAR_LEAD_CANONICAL_COMBINING_CLASS
=0x1010,
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 .
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*/
504 /** One more than the last constant for enumerated/integer Unicode properties. @stable ICU 2.2 */
505 UCHAR_INT_LIMIT
=0x1015,
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.
515 UCHAR_GENERAL_CATEGORY_MASK
=0x2000,
516 /** First constant for bit-mask Unicode properties. @stable ICU 2.4 */
517 UCHAR_MASK_START
=UCHAR_GENERAL_CATEGORY_MASK
,
518 /** One more than the last constant for bit-mask Unicode properties. @stable ICU 2.4 */
519 UCHAR_MASK_LIMIT
=0x2001,
521 /** Double property Numeric_Value.
522 Corresponds to u_getNumericValue. @stable ICU 2.4 */
523 UCHAR_NUMERIC_VALUE
=0x3000,
524 /** First constant for double Unicode properties. @stable ICU 2.4 */
525 UCHAR_DOUBLE_START
=UCHAR_NUMERIC_VALUE
,
526 /** One more than the last constant for double Unicode properties. @stable ICU 2.4 */
527 UCHAR_DOUBLE_LIMIT
=0x3001,
529 /** String property Age.
530 Corresponds to u_charAge. @stable ICU 2.4 */
532 /** First constant for string Unicode properties. @stable ICU 2.4 */
533 UCHAR_STRING_START
=UCHAR_AGE
,
534 /** String property Bidi_Mirroring_Glyph.
535 Corresponds to u_charMirror. @stable ICU 2.4 */
536 UCHAR_BIDI_MIRRORING_GLYPH
=0x4001,
537 /** String property Case_Folding.
538 Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */
539 UCHAR_CASE_FOLDING
=0x4002,
540 /** String property ISO_Comment.
541 Corresponds to u_getISOComment. @stable ICU 2.4 */
542 UCHAR_ISO_COMMENT
=0x4003,
543 /** String property Lowercase_Mapping.
544 Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */
545 UCHAR_LOWERCASE_MAPPING
=0x4004,
546 /** String property Name.
547 Corresponds to u_charName. @stable ICU 2.4 */
549 /** String property Simple_Case_Folding.
550 Corresponds to u_foldCase. @stable ICU 2.4 */
551 UCHAR_SIMPLE_CASE_FOLDING
=0x4006,
552 /** String property Simple_Lowercase_Mapping.
553 Corresponds to u_tolower. @stable ICU 2.4 */
554 UCHAR_SIMPLE_LOWERCASE_MAPPING
=0x4007,
555 /** String property Simple_Titlecase_Mapping.
556 Corresponds to u_totitle. @stable ICU 2.4 */
557 UCHAR_SIMPLE_TITLECASE_MAPPING
=0x4008,
558 /** String property Simple_Uppercase_Mapping.
559 Corresponds to u_toupper. @stable ICU 2.4 */
560 UCHAR_SIMPLE_UPPERCASE_MAPPING
=0x4009,
561 /** String property Titlecase_Mapping.
562 Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */
563 UCHAR_TITLECASE_MAPPING
=0x400A,
564 /** String property Unicode_1_Name.
565 Corresponds to u_charName. @stable ICU 2.4 */
566 UCHAR_UNICODE_1_NAME
=0x400B,
567 /** String property Uppercase_Mapping.
568 Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */
569 UCHAR_UPPERCASE_MAPPING
=0x400C,
570 /** One more than the last constant for string Unicode properties. @stable ICU 2.4 */
571 UCHAR_STRING_LIMIT
=0x400D,
573 /** Represents a nonexistent or invalid property or property value. @stable ICU 2.4 */
574 UCHAR_INVALID_CODE
= -1
578 * Data for enumerated Unicode general category types.
579 * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html .
582 typedef enum UCharCategory
584 /** See note !!. Comments of the form "Cn" are read by genpname. */
586 /** Non-category for unassigned and non-character code points. @stable ICU 2.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 */
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 */
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 */
620 /** Cf @stable ICU 2.0 */
622 /** Co @stable ICU 2.0 */
623 U_PRIVATE_USE_CHAR
= 17,
624 /** Cs @stable ICU 2.0 */
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 */
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 */
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
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.
658 * There are also some U_GC_Y_MASK constants for groups of general categories
659 * like L for all letter categories.
666 #define U_GC_CN_MASK U_MASK(U_GENERAL_OTHER_TYPES)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
765 * This specifies the language directional property of a character set.
768 typedef enum UCharDirection
{
769 /** See note !!. Comments of the form "EN" are read by genpname. */
771 /** L @stable ICU 2.0 */
773 /** R @stable ICU 2.0 */
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 */
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
814 * Constants for Unicode blocks, see the Unicode Data file Blocks.txt
819 /** New No_Block value in Unicode 4. @stable ICU 2.6 */
820 UBLOCK_NO_BLOCK
= 0, /*[none]*/ /* Special range indicating No_Block */
822 /** @stable ICU 2.0 */
823 UBLOCK_BASIC_LATIN
= 1, /*[0000]*/ /*See note !!*/
825 /** @stable ICU 2.0 */
826 UBLOCK_LATIN_1_SUPPLEMENT
=2, /*[0080]*/
828 /** @stable ICU 2.0 */
829 UBLOCK_LATIN_EXTENDED_A
=3, /*[0100]*/
831 /** @stable ICU 2.0 */
832 UBLOCK_LATIN_EXTENDED_B
=4, /*[0180]*/
834 /** @stable ICU 2.0 */
835 UBLOCK_IPA_EXTENSIONS
=5, /*[0250]*/
837 /** @stable ICU 2.0 */
838 UBLOCK_SPACING_MODIFIER_LETTERS
=6, /*[02B0]*/
840 /** @stable ICU 2.0 */
841 UBLOCK_COMBINING_DIACRITICAL_MARKS
=7, /*[0300]*/
844 * Unicode 3.2 renames this block to "Greek and Coptic".
847 UBLOCK_GREEK
=8, /*[0370]*/
849 /** @stable ICU 2.0 */
850 UBLOCK_CYRILLIC
=9, /*[0400]*/
852 /** @stable ICU 2.0 */
853 UBLOCK_ARMENIAN
=10, /*[0530]*/
855 /** @stable ICU 2.0 */
856 UBLOCK_HEBREW
=11, /*[0590]*/
858 /** @stable ICU 2.0 */
859 UBLOCK_ARABIC
=12, /*[0600]*/
861 /** @stable ICU 2.0 */
862 UBLOCK_SYRIAC
=13, /*[0700]*/
864 /** @stable ICU 2.0 */
865 UBLOCK_THAANA
=14, /*[0780]*/
867 /** @stable ICU 2.0 */
868 UBLOCK_DEVANAGARI
=15, /*[0900]*/
870 /** @stable ICU 2.0 */
871 UBLOCK_BENGALI
=16, /*[0980]*/
873 /** @stable ICU 2.0 */
874 UBLOCK_GURMUKHI
=17, /*[0A00]*/
876 /** @stable ICU 2.0 */
877 UBLOCK_GUJARATI
=18, /*[0A80]*/
879 /** @stable ICU 2.0 */
880 UBLOCK_ORIYA
=19, /*[0B00]*/
882 /** @stable ICU 2.0 */
883 UBLOCK_TAMIL
=20, /*[0B80]*/
885 /** @stable ICU 2.0 */
886 UBLOCK_TELUGU
=21, /*[0C00]*/
888 /** @stable ICU 2.0 */
889 UBLOCK_KANNADA
=22, /*[0C80]*/
891 /** @stable ICU 2.0 */
892 UBLOCK_MALAYALAM
=23, /*[0D00]*/
894 /** @stable ICU 2.0 */
895 UBLOCK_SINHALA
=24, /*[0D80]*/
897 /** @stable ICU 2.0 */
898 UBLOCK_THAI
=25, /*[0E00]*/
900 /** @stable ICU 2.0 */
901 UBLOCK_LAO
=26, /*[0E80]*/
903 /** @stable ICU 2.0 */
904 UBLOCK_TIBETAN
=27, /*[0F00]*/
906 /** @stable ICU 2.0 */
907 UBLOCK_MYANMAR
=28, /*[1000]*/
909 /** @stable ICU 2.0 */
910 UBLOCK_GEORGIAN
=29, /*[10A0]*/
912 /** @stable ICU 2.0 */
913 UBLOCK_HANGUL_JAMO
=30, /*[1100]*/
915 /** @stable ICU 2.0 */
916 UBLOCK_ETHIOPIC
=31, /*[1200]*/
918 /** @stable ICU 2.0 */
919 UBLOCK_CHEROKEE
=32, /*[13A0]*/
921 /** @stable ICU 2.0 */
922 UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS
=33, /*[1400]*/
924 /** @stable ICU 2.0 */
925 UBLOCK_OGHAM
=34, /*[1680]*/
927 /** @stable ICU 2.0 */
928 UBLOCK_RUNIC
=35, /*[16A0]*/
930 /** @stable ICU 2.0 */
931 UBLOCK_KHMER
=36, /*[1780]*/
933 /** @stable ICU 2.0 */
934 UBLOCK_MONGOLIAN
=37, /*[1800]*/
936 /** @stable ICU 2.0 */
937 UBLOCK_LATIN_EXTENDED_ADDITIONAL
=38, /*[1E00]*/
939 /** @stable ICU 2.0 */
940 UBLOCK_GREEK_EXTENDED
=39, /*[1F00]*/
942 /** @stable ICU 2.0 */
943 UBLOCK_GENERAL_PUNCTUATION
=40, /*[2000]*/
945 /** @stable ICU 2.0 */
946 UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS
=41, /*[2070]*/
948 /** @stable ICU 2.0 */
949 UBLOCK_CURRENCY_SYMBOLS
=42, /*[20A0]*/
952 * Unicode 3.2 renames this block to "Combining Diacritical Marks for Symbols".
955 UBLOCK_COMBINING_MARKS_FOR_SYMBOLS
=43, /*[20D0]*/
957 /** @stable ICU 2.0 */
958 UBLOCK_LETTERLIKE_SYMBOLS
=44, /*[2100]*/
960 /** @stable ICU 2.0 */
961 UBLOCK_NUMBER_FORMS
=45, /*[2150]*/
963 /** @stable ICU 2.0 */
964 UBLOCK_ARROWS
=46, /*[2190]*/
966 /** @stable ICU 2.0 */
967 UBLOCK_MATHEMATICAL_OPERATORS
=47, /*[2200]*/
969 /** @stable ICU 2.0 */
970 UBLOCK_MISCELLANEOUS_TECHNICAL
=48, /*[2300]*/
972 /** @stable ICU 2.0 */
973 UBLOCK_CONTROL_PICTURES
=49, /*[2400]*/
975 /** @stable ICU 2.0 */
976 UBLOCK_OPTICAL_CHARACTER_RECOGNITION
=50, /*[2440]*/
978 /** @stable ICU 2.0 */
979 UBLOCK_ENCLOSED_ALPHANUMERICS
=51, /*[2460]*/
981 /** @stable ICU 2.0 */
982 UBLOCK_BOX_DRAWING
=52, /*[2500]*/
984 /** @stable ICU 2.0 */
985 UBLOCK_BLOCK_ELEMENTS
=53, /*[2580]*/
987 /** @stable ICU 2.0 */
988 UBLOCK_GEOMETRIC_SHAPES
=54, /*[25A0]*/
990 /** @stable ICU 2.0 */
991 UBLOCK_MISCELLANEOUS_SYMBOLS
=55, /*[2600]*/
993 /** @stable ICU 2.0 */
994 UBLOCK_DINGBATS
=56, /*[2700]*/
996 /** @stable ICU 2.0 */
997 UBLOCK_BRAILLE_PATTERNS
=57, /*[2800]*/
999 /** @stable ICU 2.0 */
1000 UBLOCK_CJK_RADICALS_SUPPLEMENT
=58, /*[2E80]*/
1002 /** @stable ICU 2.0 */
1003 UBLOCK_KANGXI_RADICALS
=59, /*[2F00]*/
1005 /** @stable ICU 2.0 */
1006 UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS
=60, /*[2FF0]*/
1008 /** @stable ICU 2.0 */
1009 UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION
=61, /*[3000]*/
1011 /** @stable ICU 2.0 */
1012 UBLOCK_HIRAGANA
=62, /*[3040]*/
1014 /** @stable ICU 2.0 */
1015 UBLOCK_KATAKANA
=63, /*[30A0]*/
1017 /** @stable ICU 2.0 */
1018 UBLOCK_BOPOMOFO
=64, /*[3100]*/
1020 /** @stable ICU 2.0 */
1021 UBLOCK_HANGUL_COMPATIBILITY_JAMO
=65, /*[3130]*/
1023 /** @stable ICU 2.0 */
1024 UBLOCK_KANBUN
=66, /*[3190]*/
1026 /** @stable ICU 2.0 */
1027 UBLOCK_BOPOMOFO_EXTENDED
=67, /*[31A0]*/
1029 /** @stable ICU 2.0 */
1030 UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS
=68, /*[3200]*/
1032 /** @stable ICU 2.0 */
1033 UBLOCK_CJK_COMPATIBILITY
=69, /*[3300]*/
1035 /** @stable ICU 2.0 */
1036 UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A
=70, /*[3400]*/
1038 /** @stable ICU 2.0 */
1039 UBLOCK_CJK_UNIFIED_IDEOGRAPHS
=71, /*[4E00]*/
1041 /** @stable ICU 2.0 */
1042 UBLOCK_YI_SYLLABLES
=72, /*[A000]*/
1044 /** @stable ICU 2.0 */
1045 UBLOCK_YI_RADICALS
=73, /*[A490]*/
1047 /** @stable ICU 2.0 */
1048 UBLOCK_HANGUL_SYLLABLES
=74, /*[AC00]*/
1050 /** @stable ICU 2.0 */
1051 UBLOCK_HIGH_SURROGATES
=75, /*[D800]*/
1053 /** @stable ICU 2.0 */
1054 UBLOCK_HIGH_PRIVATE_USE_SURROGATES
=76, /*[DB80]*/
1056 /** @stable ICU 2.0 */
1057 UBLOCK_LOW_SURROGATES
=77, /*[DC00]*/
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.
1068 UBLOCK_PRIVATE_USE
= 78,
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.
1078 UBLOCK_PRIVATE_USE_AREA
=UBLOCK_PRIVATE_USE
, /*[E000]*/
1080 /** @stable ICU 2.0 */
1081 UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS
=79, /*[F900]*/
1083 /** @stable ICU 2.0 */
1084 UBLOCK_ALPHABETIC_PRESENTATION_FORMS
=80, /*[FB00]*/
1086 /** @stable ICU 2.0 */
1087 UBLOCK_ARABIC_PRESENTATION_FORMS_A
=81, /*[FB50]*/
1089 /** @stable ICU 2.0 */
1090 UBLOCK_COMBINING_HALF_MARKS
=82, /*[FE20]*/
1092 /** @stable ICU 2.0 */
1093 UBLOCK_CJK_COMPATIBILITY_FORMS
=83, /*[FE30]*/
1095 /** @stable ICU 2.0 */
1096 UBLOCK_SMALL_FORM_VARIANTS
=84, /*[FE50]*/
1098 /** @stable ICU 2.0 */
1099 UBLOCK_ARABIC_PRESENTATION_FORMS_B
=85, /*[FE70]*/
1101 /** @stable ICU 2.0 */
1102 UBLOCK_SPECIALS
=86, /*[FFF0]*/
1104 /** @stable ICU 2.0 */
1105 UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS
=87, /*[FF00]*/
1107 /* New blocks in Unicode 3.1 */
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]*/
1128 /* New blocks in Unicode 3.2 */
1131 * Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrillic Supplement".
1134 UBLOCK_CYRILLIC_SUPPLEMENTARY
= 97,
1135 /** @stable ICU 3.0 */
1136 UBLOCK_CYRILLIC_SUPPLEMENT
= UBLOCK_CYRILLIC_SUPPLEMENTARY
, /*[0500]*/
1137 /** @stable ICU 2.2 */
1138 UBLOCK_TAGALOG
= 98, /*[1700]*/
1139 /** @stable ICU 2.2 */
1140 UBLOCK_HANUNOO
= 99, /*[1720]*/
1141 /** @stable ICU 2.2 */
1142 UBLOCK_BUHID
= 100, /*[1740]*/
1143 /** @stable ICU 2.2 */
1144 UBLOCK_TAGBANWA
= 101, /*[1760]*/
1145 /** @stable ICU 2.2 */
1146 UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A
= 102, /*[27C0]*/
1147 /** @stable ICU 2.2 */
1148 UBLOCK_SUPPLEMENTAL_ARROWS_A
= 103, /*[27F0]*/
1149 /** @stable ICU 2.2 */
1150 UBLOCK_SUPPLEMENTAL_ARROWS_B
= 104, /*[2900]*/
1151 /** @stable ICU 2.2 */
1152 UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B
= 105, /*[2980]*/
1153 /** @stable ICU 2.2 */
1154 UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS
= 106, /*[2A00]*/
1155 /** @stable ICU 2.2 */
1156 UBLOCK_KATAKANA_PHONETIC_EXTENSIONS
= 107, /*[31F0]*/
1157 /** @stable ICU 2.2 */
1158 UBLOCK_VARIATION_SELECTORS
= 108, /*[FE00]*/
1159 /** @stable ICU 2.2 */
1160 UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A
= 109, /*[F0000]*/
1161 /** @stable ICU 2.2 */
1162 UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B
= 110, /*[100000]*/
1164 /* New blocks in Unicode 4 */
1166 /** @stable ICU 2.6 */
1167 UBLOCK_LIMBU
= 111, /*[1900]*/
1168 /** @stable ICU 2.6 */
1169 UBLOCK_TAI_LE
= 112, /*[1950]*/
1170 /** @stable ICU 2.6 */
1171 UBLOCK_KHMER_SYMBOLS
= 113, /*[19E0]*/
1172 /** @stable ICU 2.6 */
1173 UBLOCK_PHONETIC_EXTENSIONS
= 114, /*[1D00]*/
1174 /** @stable ICU 2.6 */
1175 UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS
= 115, /*[2B00]*/
1176 /** @stable ICU 2.6 */
1177 UBLOCK_YIJING_HEXAGRAM_SYMBOLS
= 116, /*[4DC0]*/
1178 /** @stable ICU 2.6 */
1179 UBLOCK_LINEAR_B_SYLLABARY
= 117, /*[10000]*/
1180 /** @stable ICU 2.6 */
1181 UBLOCK_LINEAR_B_IDEOGRAMS
= 118, /*[10080]*/
1182 /** @stable ICU 2.6 */
1183 UBLOCK_AEGEAN_NUMBERS
= 119, /*[10100]*/
1184 /** @stable ICU 2.6 */
1185 UBLOCK_UGARITIC
= 120, /*[10380]*/
1186 /** @stable ICU 2.6 */
1187 UBLOCK_SHAVIAN
= 121, /*[10450]*/
1188 /** @stable ICU 2.6 */
1189 UBLOCK_OSMANYA
= 122, /*[10480]*/
1190 /** @stable ICU 2.6 */
1191 UBLOCK_CYPRIOT_SYLLABARY
= 123, /*[10800]*/
1192 /** @stable ICU 2.6 */
1193 UBLOCK_TAI_XUAN_JING_SYMBOLS
= 124, /*[1D300]*/
1194 /** @stable ICU 2.6 */
1195 UBLOCK_VARIATION_SELECTORS_SUPPLEMENT
= 125, /*[E0100]*/
1197 #ifndef U_HIDE_DRAFT_API
1198 /* New blocks in Unicode 4.1 */
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]*/
1241 /* New blocks in Unicode 5.0 */
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]*/
1262 #endif /*U_HIDE_DRAFT_API*/
1264 /** @stable ICU 2.0 */
1267 /** @stable ICU 2.0 */
1268 UBLOCK_INVALID_CODE
=-1
1271 /** @stable ICU 2.0 */
1272 typedef enum UBlockCode UBlockCode
;
1275 * East Asian Width constants.
1277 * @see UCHAR_EAST_ASIAN_WIDTH
1278 * @see u_getIntPropertyValue
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]*/
1291 * Implementation note:
1292 * Keep UEastAsianWidth constant values in sync with names list in genprops/props2.c.
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.
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
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
1322 * @see u_getPropertyName()
1323 * @see u_getPropertyValueName()
1326 typedef enum UPropertyNameChoice
{
1327 U_SHORT_PROPERTY_NAME
,
1328 U_LONG_PROPERTY_NAME
,
1329 U_PROPERTY_NAME_CHOICE_COUNT
1330 } UPropertyNameChoice
;
1333 * Decomposition Type constants.
1335 * @see UCHAR_DECOMPOSITION_TYPE
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]*/
1354 U_DT_SUPER
, /*[sup]*/
1355 U_DT_VERTICAL
, /*[vert]*/
1356 U_DT_WIDE
, /*[wide]*/
1358 } UDecompositionType
;
1361 * Joining Type constants.
1363 * @see UCHAR_JOINING_TYPE
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]*/
1377 * Joining Group constants.
1379 * @see UCHAR_JOINING_GROUP
1382 typedef enum UJoiningGroup
{
1383 U_JG_NO_JOINING_GROUP
,
1397 U_JG_HAMZA_ON_HEH_GOAL
,
1434 U_JG_FE
, /**< @stable ICU 2.6 */
1435 U_JG_KHAPH
, /**< @stable ICU 2.6 */
1436 U_JG_ZHAIN
, /**< @stable ICU 2.6 */
1441 * Grapheme Cluster Break constants.
1443 * @see UCHAR_GRAPHEME_CLUSTER_BREAK
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*/
1460 } UGraphemeClusterBreak
;
1463 * Word Break constants.
1464 * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.)
1466 * @see UCHAR_WORD_BREAK
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*/
1484 * Sentence Break constants.
1486 * @see UCHAR_SENTENCE_BREAK
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*/
1507 * Line Break constants.
1509 * @see UCHAR_LINE_BREAK
1512 typedef enum ULineBreak
{
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 */
1530 U_LB_INSEPARABLE
=U_LB_INSEPERABLE
,/*[IN]*/
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]*/
1555 * Numeric Type constants.
1557 * @see UCHAR_NUMERIC_TYPE
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]*/
1569 * Hangul Syllable Type constants.
1571 * @see UCHAR_HANGUL_SYLLABLE_TYPE
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]*/
1582 } UHangulSyllableType
;
1585 * Check a binary Unicode property for a code point.
1587 * Unicode, especially in version 3.2, defines many more properties than the
1588 * original set in UnicodeData.txt.
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.
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.
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.
1606 * @see u_getIntPropertyValue
1607 * @see u_getUnicodeVersion
1610 U_STABLE UBool U_EXPORT2
1611 u_hasBinaryProperty(UChar32 c
, UProperty which
);
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
1620 * @see UCHAR_ALPHABETIC
1622 * @see u_hasBinaryProperty
1625 U_STABLE UBool U_EXPORT2
1626 u_isUAlphabetic(UChar32 c
);
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
1635 * @see UCHAR_LOWERCASE
1637 * @see u_hasBinaryProperty
1640 U_STABLE UBool U_EXPORT2
1641 u_isULowercase(UChar32 c
);
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
1650 * @see UCHAR_UPPERCASE
1652 * @see u_hasBinaryProperty
1655 U_STABLE UBool U_EXPORT2
1656 u_isUUppercase(UChar32 c
);
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!
1663 * Note: There are several ICU whitespace functions; please see the uchar.h
1664 * file documentation for a detailed comparison.
1666 * @param c Code point to test
1667 * @return true if the code point has the White_Space Unicode property, false otherwise.
1669 * @see UCHAR_WHITE_SPACE
1670 * @see u_isWhitespace
1672 * @see u_isJavaSpaceChar
1673 * @see u_hasBinaryProperty
1676 U_STABLE UBool U_EXPORT2
1677 u_isUWhiteSpace(UChar32 c
);
1680 * Get the property value for an enumerated or integer Unicode property for a code point.
1681 * Also returns binary and mask property values.
1683 * Unicode, especially in version 3.2, defines many more properties than the
1684 * original set in UnicodeData.txt.
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.
1692 * UEastAsianWidth ea=(UEastAsianWidth)u_getIntPropertyValue(c, UCHAR_EAST_ASIAN_WIDTH);
1693 * UBool b=(UBool)u_getIntPropertyValue(c, UCHAR_IDEOGRAPHIC);
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.
1710 * @see u_hasBinaryProperty
1711 * @see u_getIntPropertyMinValue
1712 * @see u_getIntPropertyMaxValue
1713 * @see u_getUnicodeVersion
1716 U_STABLE
int32_t U_EXPORT2
1717 u_getIntPropertyValue(UChar32 c
, UProperty which
);
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.
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.
1731 * @see u_hasBinaryProperty
1732 * @see u_getUnicodeVersion
1733 * @see u_getIntPropertyMaxValue
1734 * @see u_getIntPropertyValue
1737 U_STABLE
int32_t U_EXPORT2
1738 u_getIntPropertyMinValue(UProperty which
);
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.
1745 * Examples for min/max values (for Unicode 3.2):
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)
1751 * For undefined UProperty constant values, min/max values will be 0/-1.
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.
1760 * @see u_hasBinaryProperty
1761 * @see u_getUnicodeVersion
1762 * @see u_getIntPropertyMaxValue
1763 * @see u_getIntPropertyValue
1766 U_STABLE
int32_t U_EXPORT2
1767 u_getIntPropertyMaxValue(UProperty which
);
1770 * Get the numeric value for a Unicode code point as defined in the
1771 * Unicode Character Database.
1773 * A "double" return type is necessary because
1774 * some numeric values are fractions, negative, or too large for int32_t.
1776 * For characters without any numeric values in the Unicode Character Database,
1777 * this function will return U_NO_NUMERIC_VALUE.
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.
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.
1786 * @see U_NO_NUMERIC_VALUE
1789 U_STABLE
double U_EXPORT2
1790 u_getNumericValue(UChar32 c
);
1793 * Special value that is returned by u_getNumericValue when
1794 * no numeric value is defined for a code point.
1796 * @see u_getNumericValue
1799 #define U_NO_NUMERIC_VALUE ((double)-123456789.)
1802 * Determines whether the specified code point has the general category "Ll"
1803 * (lowercase letter).
1805 * Same as java.lang.Character.isLowerCase().
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.
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.
1816 * @param c the code point to be tested
1817 * @return TRUE if the code point is an Ll lowercase letter
1819 * @see UCHAR_LOWERCASE
1824 U_STABLE UBool U_EXPORT2
1825 u_islower(UChar32 c
);
1828 * Determines whether the specified code point has the general category "Lu"
1829 * (uppercase letter).
1831 * Same as java.lang.Character.isUpperCase().
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.
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.
1842 * @param c the code point to be tested
1843 * @return TRUE if the code point is an Lu uppercase letter
1845 * @see UCHAR_UPPERCASE
1851 U_STABLE UBool U_EXPORT2
1852 u_isupper(UChar32 c
);
1855 * Determines whether the specified code point is a titlecase letter.
1856 * True for general category "Lt" (titlecase letter).
1858 * Same as java.lang.Character.isTitleCase().
1860 * @param c the code point to be tested
1861 * @return TRUE if the code point is an Lt titlecase letter
1868 U_STABLE UBool U_EXPORT2
1869 u_istitle(UChar32 c
);
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.
1877 * Same as java.lang.Character.isDigit().
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.
1884 * @param c the code point to be tested
1885 * @return TRUE if the code point is a digit character according to Character.isDigit()
1889 U_STABLE UBool U_EXPORT2
1890 u_isdigit(UChar32 c
);
1893 * Determines whether the specified code point is a letter character.
1894 * True for general categories "L" (letters).
1896 * Same as java.lang.Character.isLetter().
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.
1903 * @param c the code point to be tested
1904 * @return TRUE if the code point is a letter character
1910 U_STABLE UBool U_EXPORT2
1911 u_isalpha(UChar32 c
);
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).
1919 * Same as java.lang.Character.isLetterOrDigit().
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.
1926 * @param c the code point to be tested
1927 * @return TRUE if the code point is an alphanumeric character according to Character.isLetterOrDigit()
1931 U_STABLE UBool U_EXPORT2
1932 u_isalnum(UChar32 c
);
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.)
1942 * In order to narrow the definition of hexadecimal digits to only ASCII
1943 * characters, use (c<=0x7f && u_isxdigit(c)).
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.
1949 * @param c the code point to be tested
1950 * @return TRUE if the code point is a hexadecimal digit
1954 U_STABLE UBool U_EXPORT2
1955 u_isxdigit(UChar32 c
);
1958 * Determines whether the specified code point is a punctuation character.
1959 * True for characters with general categories "P" (punctuation).
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.
1965 * @param c the code point to be tested
1966 * @return TRUE if the code point is a punctuation character
1970 U_STABLE UBool U_EXPORT2
1971 u_ispunct(UChar32 c
);
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).
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.
1984 * @param c the code point to be tested
1985 * @return TRUE if the code point is a "graphic" character
1989 U_STABLE UBool U_EXPORT2
1990 u_isgraph(UChar32 c
);
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:
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)
2003 * TRUE for U+0009 (TAB) and characters with general category "Zs" (space separators)
2004 * except Zero Width Space (ZWSP, U+200B).
2006 * Note: There are several ICU whitespace functions; please see the uchar.h
2007 * file documentation for a detailed comparison.
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.
2013 * @param c the code point to be tested
2014 * @return TRUE if the code point is a "blank"
2018 U_STABLE UBool U_EXPORT2
2019 u_isblank(UChar32 c
);
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.
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).
2030 * Same as java.lang.Character.isDefined().
2032 * @param c the code point to be tested
2033 * @return TRUE if the code point is assigned a character
2043 U_STABLE UBool U_EXPORT2
2044 u_isdefined(UChar32 c
);
2047 * Determines if the specified character is a space character or not.
2049 * Note: There are several ICU whitespace functions; please see the uchar.h
2050 * file documentation for a detailed comparison.
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.
2056 * @param c the character to be tested
2057 * @return true if the character is a space character; false otherwise.
2059 * @see u_isJavaSpaceChar
2060 * @see u_isWhitespace
2061 * @see u_isUWhiteSpace
2064 U_STABLE UBool U_EXPORT2
2065 u_isspace(UChar32 c
);
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).
2072 * Same as java.lang.Character.isSpaceChar().
2074 * Note: There are several ICU whitespace functions; please see the uchar.h
2075 * file documentation for a detailed comparison.
2077 * @param c the code point to be tested
2078 * @return TRUE if the code point is a space character according to Character.isSpaceChar()
2081 * @see u_isWhitespace
2082 * @see u_isUWhiteSpace
2085 U_STABLE UBool U_EXPORT2
2086 u_isJavaSpaceChar(UChar32 c
);
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:
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.
2106 * Same as java.lang.Character.isWhitespace() except that Java omits U+0085.
2108 * Note: There are several ICU whitespace functions; please see the uchar.h
2109 * file documentation for a detailed comparison.
2111 * @param c the code point to be tested
2112 * @return TRUE if the code point is a whitespace character according to Java/ICU
2115 * @see u_isJavaSpaceChar
2116 * @see u_isUWhiteSpace
2119 U_STABLE UBool U_EXPORT2
2120 u_isWhitespace(UChar32 c
);
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)
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.
2136 * @param c the code point to be tested
2137 * @return TRUE if the code point is a control character
2139 * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
2143 U_STABLE UBool U_EXPORT2
2144 u_iscntrl(UChar32 c
);
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").
2150 * Same as java.lang.Character.isISOControl().
2152 * @param c the code point to be tested
2153 * @return TRUE if the code point is an ISO control code
2158 U_STABLE UBool U_EXPORT2
2159 u_isISOControl(UChar32 c
);
2162 * Determines whether the specified code point is a printable character.
2163 * True for general categories <em>other</em> than "C" (controls).
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.
2169 * @param c the code point to be tested
2170 * @return TRUE if the code point is a printable character
2172 * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
2176 U_STABLE UBool U_EXPORT2
2177 u_isprint(UChar32 c
);
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).
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.
2190 * @param c the code point to be tested
2191 * @return TRUE if the code point is a base character according to this function
2197 U_STABLE UBool U_EXPORT2
2198 u_isbase(UChar32 c
);
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.
2208 * Same as java.lang.Character.getDirectionality()
2210 * @param c the code point to be tested
2211 * @return the bidirectional category (UCharDirection) value
2213 * @see UCharDirection
2216 U_STABLE UCharDirection U_EXPORT2
2217 u_charDirection(UChar32 c
);
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"
2225 * Same as java.lang.Character.isMirrored().
2226 * Same as UCHAR_BIDI_MIRRORED
2228 * @param c the code point to be tested
2229 * @return TRUE if the character has the Bidi_Mirrored property
2231 * @see UCHAR_BIDI_MIRRORED
2234 U_STABLE UBool U_EXPORT2
2235 u_isMirrored(UChar32 c
);
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.
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
2252 * @see UCHAR_BIDI_MIRRORED
2256 U_STABLE UChar32 U_EXPORT2
2257 u_charMirror(UChar32 c
);
2260 * Returns the general category value for the code point.
2262 * Same as java.lang.Character.getType().
2264 * @param c the code point to be tested
2265 * @return the general category (UCharCategory) value
2267 * @see UCharCategory
2270 U_STABLE
int8_t U_EXPORT2
2271 u_charType(UChar32 c
);
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)).
2278 * @param c the code point to be tested
2279 * @return a single-bit mask corresponding to the general category (UCharCategory) value
2282 * @see UCharCategory
2286 #define U_GET_GC_MASK(c) U_MASK(u_charType(c))
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").
2293 * The callback function can stop the enumeration by returning FALSE.
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
2302 * @see UCharCategory
2303 * @see u_enumCharTypes
2305 typedef UBool U_CALLCONV
2306 UCharEnumTypeRange(const void *context
, UChar32 start
, UChar32 limit
, UCharCategory type
);
2309 * Enumerate efficiently all code points with their Unicode general categories.
2311 * This is useful for building data structures (e.g., UnicodeSet's),
2312 * for enumerating all assigned code points (type!=U_UNASSIGNED), etc.
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.
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
2324 * @see UCharCategory
2325 * @see UCharEnumTypeRange
2327 U_STABLE
void U_EXPORT2
2328 u_enumCharTypes(UCharEnumTypeRange
*enumRange
, const void *context
);
2330 #if !UCONFIG_NO_NORMALIZATION
2333 * Returns the combining class of the code point as specified in UnicodeData.txt.
2335 * @param c the code point of the character
2336 * @return the combining class of the character
2339 U_STABLE
uint8_t U_EXPORT2
2340 u_getCombiningClass(UChar32 c
);
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.
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.
2357 * Use u_getIntPropertyValue(c, UCHAR_NUMERIC_TYPE) and u_getNumericValue()
2358 * for complete numeric Unicode properties.
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
2364 * @see u_getNumericValue
2367 U_STABLE
int32_t U_EXPORT2
2368 u_charDigitValue(UChar32 c
);
2371 * Returns the Unicode allocation block that contains the character.
2373 * @param c the code point to be tested
2374 * @return the block value (UBlockCode) for c
2379 U_STABLE UBlockCode U_EXPORT2
2380 ublock_getCode(UChar32 c
);
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.
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>
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.
2409 * @see UCharNameChoice
2410 * @see u_charFromName
2411 * @see u_enumCharNames
2414 U_STABLE
int32_t U_EXPORT2
2415 u_charName(UChar32 code
, UCharNameChoice nameChoice
,
2416 char *buffer
, int32_t bufferLength
,
2417 UErrorCode
*pErrorCode
);
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.
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>
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.
2441 U_STABLE
int32_t U_EXPORT2
2442 u_getISOComment(UChar32 c
,
2443 char *dest
, int32_t destCapacity
,
2444 UErrorCode
*pErrorCode
);
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.
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.
2461 * @see UCharNameChoice
2463 * @see u_enumCharNames
2466 U_STABLE UChar32 U_EXPORT2
2467 u_charFromName(UCharNameChoice nameChoice
,
2469 UErrorCode
*pErrorCode
);
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.
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.
2484 * @see UCharNameChoice
2485 * @see u_enumCharNames
2488 typedef UBool U_CALLCONV
UEnumCharNamesFn(void *context
,
2490 UCharNameChoice nameChoice
,
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
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
2509 * @see UCharNameChoice
2510 * @see UEnumCharNamesFn
2512 * @see u_charFromName
2515 U_STABLE
void U_EXPORT2
2516 u_enumCharNames(UChar32 start
, UChar32 limit
,
2517 UEnumCharNamesFn
*fn
,
2519 UCharNameChoice nameChoice
,
2520 UErrorCode
*pErrorCode
);
2523 * Return the Unicode name for a given property, as given in the
2524 * Unicode database file PropertyAliases.txt.
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.
2531 * @param property UProperty selector other than UCHAR_INVALID_CODE.
2532 * If out of range, NULL is returned.
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,...
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.
2550 * @see UPropertyNameChoice
2553 U_STABLE
const char* U_EXPORT2
2554 u_getPropertyName(UProperty property
,
2555 UPropertyNameChoice nameChoice
);
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.
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.
2567 * @param alias the property name to be matched. The name is compared
2568 * using "loose matching" as described in PropertyAliases.txt.
2570 * @return a UProperty enum, or UCHAR_INVALID_CODE if the given name
2571 * does not match any property.
2576 U_STABLE UProperty U_EXPORT2
2577 u_getPropertyEnum(const char* alias
);
2580 * Return the Unicode name for a given property value, as given in the
2581 * Unicode database file PropertyValueAliases.txt.
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".
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.
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.
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,...
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.
2623 * @see UPropertyNameChoice
2626 U_STABLE
const char* U_EXPORT2
2627 u_getPropertyValueName(UProperty property
,
2629 UPropertyNameChoice nameChoice
);
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.
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".
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.
2648 * @param alias the value name to be matched. The name is compared
2649 * using "loose matching" as described in
2650 * PropertyValueAliases.txt.
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.
2662 U_STABLE
int32_t U_EXPORT2
2663 u_getPropertyValueEnum(UProperty property
,
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).
2672 * Same as java.lang.Character.isUnicodeIdentifierStart().
2673 * Same as UCHAR_ID_START
2675 * @param c the code point to be tested
2676 * @return TRUE if the code point may start an identifier
2678 * @see UCHAR_ID_START
2683 U_STABLE UBool U_EXPORT2
2684 u_isIDStart(UChar32 c
);
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).
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).
2699 * @param c the code point to be tested
2700 * @return TRUE if the code point may occur in an identifier according to Java
2702 * @see UCHAR_ID_CONTINUE
2704 * @see u_isIDIgnorable
2707 U_STABLE UBool U_EXPORT2
2708 u_isIDPart(UChar32 c
);
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).
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).
2722 * Note that Unicode just recommends to ignore Cf (format controls).
2724 * @param c the code point to be tested
2725 * @return TRUE if the code point is ignorable in identifiers according to Java
2727 * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT
2732 U_STABLE UBool U_EXPORT2
2733 u_isIDIgnorable(UChar32 c
);
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).
2741 * Same as java.lang.Character.isJavaIdentifierStart().
2743 * @param c the code point to be tested
2744 * @return TRUE if the code point may start a Java identifier
2746 * @see u_isJavaIDPart
2751 U_STABLE UBool U_EXPORT2
2752 u_isJavaIDStart(UChar32 c
);
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).
2760 * Same as java.lang.Character.isJavaIdentifierPart().
2762 * @param c the code point to be tested
2763 * @return TRUE if the code point may occur in a Java identifier
2765 * @see u_isIDIgnorable
2766 * @see u_isJavaIDStart
2772 U_STABLE UBool U_EXPORT2
2773 u_isJavaIDPart(UChar32 c
);
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.
2780 * Same as java.lang.Character.toLowerCase().
2782 * This function only returns the simple, single-code point case mapping.
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.
2787 * Full case mappings are applied by the string case mapping functions,
2788 * see ustring.h and the UnicodeString class.
2789 * See also the User Guide chapter on C/POSIX migration:
2790 * http://icu.sourceforge.net/userguide/posix.html#case_mappings
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.
2797 U_STABLE UChar32 U_EXPORT2
2798 u_tolower(UChar32 c
);
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
2805 * Same as java.lang.Character.toUpperCase().
2807 * This function only returns the simple, single-code point case mapping.
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.
2812 * Full case mappings are applied by the string case mapping functions,
2813 * see ustring.h and the UnicodeString class.
2814 * See also the User Guide chapter on C/POSIX migration:
2815 * http://icu.sourceforge.net/userguide/posix.html#case_mappings
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.
2822 U_STABLE UChar32 U_EXPORT2
2823 u_toupper(UChar32 c
);
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.
2830 * Same as java.lang.Character.toTitleCase().
2832 * This function only returns the simple, single-code point case mapping.
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.
2837 * Full case mappings are applied by the string case mapping functions,
2838 * see ustring.h and the UnicodeString class.
2839 * See also the User Guide chapter on C/POSIX migration:
2840 * http://icu.sourceforge.net/userguide/posix.html#case_mappings
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.
2847 U_STABLE UChar32 U_EXPORT2
2848 u_totitle(UChar32 c
);
2850 /** Option value for case folding: use default mappings defined in CaseFolding.txt. @stable ICU 2.0 */
2851 #define U_FOLD_CASE_DEFAULT 0
2854 * Option value for case folding:
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).
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.
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.
2869 #define U_FOLD_CASE_EXCLUDE_SPECIAL_I 1
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.
2877 * This function only returns the simple, single-code point case mapping.
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.
2882 * Full case mappings are applied by the string case mapping functions,
2883 * see ustring.h and the UnicodeString class.
2884 * See also the User Guide chapter on C/POSIX migration:
2885 * http://icu.sourceforge.net/userguide/posix.html#case_mappings
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.
2893 U_STABLE UChar32 U_EXPORT2
2894 u_foldCase(UChar32 c
, uint32_t options
);
2897 * Returns the decimal digit value of the code point in the
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:
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>
2920 * Same as java.lang.Character.digit().
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
2926 * or -1 if there is no value or if the value exceeds the radix.
2928 * @see UCHAR_NUMERIC_TYPE
2930 * @see u_charDigitValue
2934 U_STABLE
int32_t U_EXPORT2
2935 u_digit(UChar32 ch
, int8_t radix
);
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.
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>.
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.
2953 * Same as java.lang.Character.forDigit().
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.
2961 * @see u_charDigitValue
2965 U_STABLE UChar32 U_EXPORT2
2966 u_forDigit(int32_t digit
, int8_t radix
);
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.
2977 * @param c The code point.
2978 * @param versionArray The Unicode version number array, to be filled in.
2982 U_STABLE
void U_EXPORT2
2983 u_charAge(UChar32 c
, UVersionInfo versionArray
);
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 }.
2992 * @param versionArray an output array that will be filled in with
2993 * the Unicode version number
2996 U_STABLE
void U_EXPORT2
2997 u_getUnicodeVersion(UVersionInfo versionArray
);
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/
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.
3020 U_STABLE
int32_t U_EXPORT2
3021 u_getFC_NFKC_Closure(UChar32 c
, UChar
*dest
, int32_t destCapacity
, UErrorCode
*pErrorCode
);