uchar.h File Reference

C API: Unicode Properties. More...

#include "unicode/utypes.h"

Go to the source code of this file.

Defines

#define U_UNICODE_VERSION   "4.1"
 Unicode version number, default for the current ICU version.
#define UCHAR_MIN_VALUE   0
 The lowest Unicode code point value.
#define UCHAR_MAX_VALUE   0x10ffff
 The highest Unicode code point value (scalar value) according to The Unicode Standard.
#define U_MASK(x)   ((uint32_t)1<<(x))
 Get a single-bit bit set (a flag) from a bit number 0.
#define U_GC_CN_MASK   U_MASK(U_GENERAL_OTHER_TYPES)
 U_GC_XX_MASK constants are bit flags corresponding to Unicode general category values.
#define U_GC_LU_MASK   U_MASK(U_UPPERCASE_LETTER)
 Mask constant for a UCharCategory.
#define U_GC_LL_MASK   U_MASK(U_LOWERCASE_LETTER)
 Mask constant for a UCharCategory.
#define U_GC_LT_MASK   U_MASK(U_TITLECASE_LETTER)
 Mask constant for a UCharCategory.
#define U_GC_LM_MASK   U_MASK(U_MODIFIER_LETTER)
 Mask constant for a UCharCategory.
#define U_GC_LO_MASK   U_MASK(U_OTHER_LETTER)
 Mask constant for a UCharCategory.
#define U_GC_MN_MASK   U_MASK(U_NON_SPACING_MARK)
 Mask constant for a UCharCategory.
#define U_GC_ME_MASK   U_MASK(U_ENCLOSING_MARK)
 Mask constant for a UCharCategory.
#define U_GC_MC_MASK   U_MASK(U_COMBINING_SPACING_MARK)
 Mask constant for a UCharCategory.
#define U_GC_ND_MASK   U_MASK(U_DECIMAL_DIGIT_NUMBER)
 Mask constant for a UCharCategory.
#define U_GC_NL_MASK   U_MASK(U_LETTER_NUMBER)
 Mask constant for a UCharCategory.
#define U_GC_NO_MASK   U_MASK(U_OTHER_NUMBER)
 Mask constant for a UCharCategory.
#define U_GC_ZS_MASK   U_MASK(U_SPACE_SEPARATOR)
 Mask constant for a UCharCategory.
#define U_GC_ZL_MASK   U_MASK(U_LINE_SEPARATOR)
 Mask constant for a UCharCategory.
#define U_GC_ZP_MASK   U_MASK(U_PARAGRAPH_SEPARATOR)
 Mask constant for a UCharCategory.
#define U_GC_CC_MASK   U_MASK(U_CONTROL_CHAR)
 Mask constant for a UCharCategory.
#define U_GC_CF_MASK   U_MASK(U_FORMAT_CHAR)
 Mask constant for a UCharCategory.
#define U_GC_CO_MASK   U_MASK(U_PRIVATE_USE_CHAR)
 Mask constant for a UCharCategory.
#define U_GC_CS_MASK   U_MASK(U_SURROGATE)
 Mask constant for a UCharCategory.
#define U_GC_PD_MASK   U_MASK(U_DASH_PUNCTUATION)
 Mask constant for a UCharCategory.
#define U_GC_PS_MASK   U_MASK(U_START_PUNCTUATION)
 Mask constant for a UCharCategory.
#define U_GC_PE_MASK   U_MASK(U_END_PUNCTUATION)
 Mask constant for a UCharCategory.
#define U_GC_PC_MASK   U_MASK(U_CONNECTOR_PUNCTUATION)
 Mask constant for a UCharCategory.
#define U_GC_PO_MASK   U_MASK(U_OTHER_PUNCTUATION)
 Mask constant for a UCharCategory.
#define U_GC_SM_MASK   U_MASK(U_MATH_SYMBOL)
 Mask constant for a UCharCategory.
#define U_GC_SC_MASK   U_MASK(U_CURRENCY_SYMBOL)
 Mask constant for a UCharCategory.
#define U_GC_SK_MASK   U_MASK(U_MODIFIER_SYMBOL)
 Mask constant for a UCharCategory.
#define U_GC_SO_MASK   U_MASK(U_OTHER_SYMBOL)
 Mask constant for a UCharCategory.
#define U_GC_PI_MASK   U_MASK(U_INITIAL_PUNCTUATION)
 Mask constant for a UCharCategory.
#define U_GC_PF_MASK   U_MASK(U_FINAL_PUNCTUATION)
 Mask constant for a UCharCategory.
#define U_GC_L_MASK   (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK|U_GC_LM_MASK|U_GC_LO_MASK)
 Mask constant for multiple UCharCategory bits (L Letters).
#define U_GC_LC_MASK   (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK)
 Mask constant for multiple UCharCategory bits (LC Cased Letters).
#define U_GC_M_MASK   (U_GC_MN_MASK|U_GC_ME_MASK|U_GC_MC_MASK)
 Mask constant for multiple UCharCategory bits (M Marks).
#define U_GC_N_MASK   (U_GC_ND_MASK|U_GC_NL_MASK|U_GC_NO_MASK)
 Mask constant for multiple UCharCategory bits (N Numbers).
#define U_GC_Z_MASK   (U_GC_ZS_MASK|U_GC_ZL_MASK|U_GC_ZP_MASK)
 Mask constant for multiple UCharCategory bits (Z Separators).
#define U_GC_C_MASK   (U_GC_CN_MASK|U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CO_MASK|U_GC_CS_MASK)
 Mask constant for multiple UCharCategory bits (C Others).
#define U_GC_P_MASK
 Mask constant for multiple UCharCategory bits (P Punctuation).
#define U_GC_S_MASK   (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK)
 Mask constant for multiple UCharCategory bits (S Symbols).
#define U_NO_NUMERIC_VALUE   ((double)-123456789.)
 Special value that is returned by u_getNumericValue when no numeric value is defined for a code point.
#define U_GET_GC_MASK(c)   U_MASK(u_charType(c))
 Get a single-bit bit set for the general category of a character.
#define U_FOLD_CASE_DEFAULT   0
 Option value for case folding: use default mappings defined in CaseFolding.txt.
#define U_FOLD_CASE_EXCLUDE_SPECIAL_I   1
 Option value for case folding:.

Typedefs

typedef enum UProperty UProperty
 Selection constants for Unicode properties.
typedef enum UCharCategory UCharCategory
 Data for enumerated Unicode general category types.
typedef enum UCharDirection UCharDirection
 This specifies the language directional property of a character set.
typedef enum UBlockCode UBlockCode
typedef enum UEastAsianWidth UEastAsianWidth
 East Asian Width constants.
typedef enum UCharNameChoice UCharNameChoice
 Selector constants for u_charName().
typedef enum UPropertyNameChoice UPropertyNameChoice
 Selector constants for u_getPropertyName() and u_getPropertyValueName().
typedef enum UDecompositionType UDecompositionType
 Decomposition Type constants.
typedef enum UJoiningType UJoiningType
 Joining Type constants.
typedef enum UJoiningGroup UJoiningGroup
 Joining Group constants.
typedef enum UGraphemeClusterBreak UGraphemeClusterBreak
 Grapheme Cluster Break constants.
typedef enum UWordBreakValues UWordBreakValues
 Word Break constants.
typedef enum USentenceBreak USentenceBreak
 Sentence Break constants.
typedef enum ULineBreak ULineBreak
 Line Break constants.
typedef enum UNumericType UNumericType
 Numeric Type constants.
typedef enum UHangulSyllableType UHangulSyllableType
 Hangul Syllable Type constants.
typedef UBool U_CALLCONV UCharEnumTypeRange (const void *context, UChar32 start, UChar32 limit, UCharCategory type)
 Callback from u_enumCharTypes(), is called for each contiguous range of code points c (where start<=c<limit) with the same Unicode general category ("character type").
typedef UBool UEnumCharNamesFn (void *context, UChar32 code, UCharNameChoice nameChoice, const char *name, int32_t length)
 Type of a callback function for u_enumCharNames() that gets called for each Unicode character with the code point value and the character name.

Functions

U_STABLE UBool u_hasBinaryProperty (UChar32 c, UProperty which)
 Check a binary Unicode property for a code point.
U_STABLE UBool u_isUAlphabetic (UChar32 c)
 Check if a code point has the Alphabetic Unicode property.
U_STABLE UBool u_isULowercase (UChar32 c)
 Check if a code point has the Lowercase Unicode property.
U_STABLE UBool u_isUUppercase (UChar32 c)
 Check if a code point has the Uppercase Unicode property.
U_STABLE UBool u_isUWhiteSpace (UChar32 c)
 Check if a code point has the White_Space Unicode property.
U_STABLE int32_t u_getIntPropertyValue (UChar32 c, UProperty which)
 Get the property value for an enumerated or integer Unicode property for a code point.
U_STABLE int32_t u_getIntPropertyMinValue (UProperty which)
 Get the minimum value for an enumerated/integer/binary Unicode property.
U_STABLE int32_t u_getIntPropertyMaxValue (UProperty which)
 Get the maximum value for an enumerated/integer/binary Unicode property.
U_STABLE double u_getNumericValue (UChar32 c)
 Get the numeric value for a Unicode code point as defined in the Unicode Character Database.
U_STABLE UBool u_islower (UChar32 c)
 Determines whether the specified code point has the general category "Ll" (lowercase letter).
U_STABLE UBool u_isupper (UChar32 c)
 Determines whether the specified code point has the general category "Lu" (uppercase letter).
U_STABLE UBool u_istitle (UChar32 c)
 Determines whether the specified code point is a titlecase letter.
U_STABLE UBool u_isdigit (UChar32 c)
 Determines whether the specified code point is a digit character according to Java.
U_STABLE UBool u_isalpha (UChar32 c)
 Determines whether the specified code point is a letter character.
U_STABLE UBool u_isalnum (UChar32 c)
 Determines whether the specified code point is an alphanumeric character (letter or digit) according to Java.
U_STABLE UBool u_isxdigit (UChar32 c)
 Determines whether the specified code point is a hexadecimal digit.
U_STABLE UBool u_ispunct (UChar32 c)
 Determines whether the specified code point is a punctuation character.
U_STABLE UBool u_isgraph (UChar32 c)
 Determines whether the specified code point is a "graphic" character (printable, excluding spaces).
U_STABLE UBool u_isblank (UChar32 c)
 Determines whether the specified code point is a "blank" or "horizontal space", a character that visibly separates words on a line.
U_STABLE UBool u_isdefined (UChar32 c)
 Determines whether the specified code point is "defined", which usually means that it is assigned a character.
U_STABLE UBool u_isspace (UChar32 c)
 Determines if the specified character is a space character or not.
U_STABLE UBool u_isJavaSpaceChar (UChar32 c)
 Determine if the specified code point is a space character according to Java.
U_STABLE UBool u_isWhitespace (UChar32 c)
 Determines if the specified code point is a whitespace character according to Java/ICU.
U_STABLE UBool u_iscntrl (UChar32 c)
 Determines whether the specified code point is a control character (as defined by this function).
U_STABLE UBool u_isISOControl (UChar32 c)
 Determines whether the specified code point is an ISO control code.
U_STABLE UBool u_isprint (UChar32 c)
 Determines whether the specified code point is a printable character.
U_STABLE UBool u_isbase (UChar32 c)
 Determines whether the specified code point is a base character.
U_STABLE UCharDirection u_charDirection (UChar32 c)
 Returns the bidirectional category value for the code point, which is used in the Unicode bidirectional algorithm (UAX #9 http://www.unicode.org/reports/tr9/).
U_STABLE UBool u_isMirrored (UChar32 c)
 Determines whether the code point has the Bidi_Mirrored property.
U_STABLE UChar32 u_charMirror (UChar32 c)
 Maps the specified character to a "mirror-image" character.
U_STABLE int8_t u_charType (UChar32 c)
 Returns the general category value for the code point.
U_STABLE void u_enumCharTypes (UCharEnumTypeRange *enumRange, const void *context)
 Enumerate efficiently all code points with their Unicode general categories.
U_STABLE uint8_t u_getCombiningClass (UChar32 c)
 Returns the combining class of the code point as specified in UnicodeData.txt.
U_STABLE int32_t u_charDigitValue (UChar32 c)
 Returns the decimal digit value of a decimal digit character.
U_STABLE UBlockCode ublock_getCode (UChar32 c)
 Returns the Unicode allocation block that contains the character.
U_STABLE int32_t u_charName (UChar32 code, UCharNameChoice nameChoice, char *buffer, int32_t bufferLength, UErrorCode *pErrorCode)
 Retrieve the name of a Unicode character.
U_STABLE int32_t u_getISOComment (UChar32 c, char *dest, int32_t destCapacity, UErrorCode *pErrorCode)
 Get the ISO 10646 comment for a character.
U_STABLE UChar32 u_charFromName (UCharNameChoice nameChoice, const char *name, UErrorCode *pErrorCode)
 Find a Unicode character by its name and return its code point value.
U_STABLE void u_enumCharNames (UChar32 start, UChar32 limit, UEnumCharNamesFn *fn, void *context, UCharNameChoice nameChoice, UErrorCode *pErrorCode)
 Enumerate all assigned Unicode characters between the start and limit code points (start inclusive, limit exclusive) and call a function for each, passing the code point value and the character name.
U_STABLE const char * u_getPropertyName (UProperty property, UPropertyNameChoice nameChoice)
 Return the Unicode name for a given property, as given in the Unicode database file PropertyAliases.txt.
U_STABLE UProperty u_getPropertyEnum (const char *alias)
 Return the UProperty enum for a given property name, as specified in the Unicode database file PropertyAliases.txt.
U_STABLE const char * u_getPropertyValueName (UProperty property, int32_t value, UPropertyNameChoice nameChoice)
 Return the Unicode name for a given property value, as given in the Unicode database file PropertyValueAliases.txt.
U_STABLE int32_t u_getPropertyValueEnum (UProperty property, const char *alias)
 Return the property value integer for a given value name, as specified in the Unicode database file PropertyValueAliases.txt.
U_STABLE UBool u_isIDStart (UChar32 c)
 Determines if the specified character is permissible as the first character in an identifier according to Unicode (The Unicode Standard, Version 3.0, chapter 5.16 Identifiers).
U_STABLE UBool u_isIDPart (UChar32 c)
 Determines if the specified character is permissible in an identifier according to Java.
U_STABLE UBool u_isIDIgnorable (UChar32 c)
 Determines if the specified character should be regarded as an ignorable character in an identifier, according to Java.
U_STABLE UBool u_isJavaIDStart (UChar32 c)
 Determines if the specified character is permissible as the first character in a Java identifier.
U_STABLE UBool u_isJavaIDPart (UChar32 c)
 Determines if the specified character is permissible in a Java identifier.
U_STABLE UChar32 u_tolower (UChar32 c)
 The given character is mapped to its lowercase equivalent according to UnicodeData.txt; if the character has no lowercase equivalent, the character itself is returned.
U_STABLE UChar32 u_toupper (UChar32 c)
 The given character is mapped to its uppercase equivalent according to UnicodeData.txt; if the character has no uppercase equivalent, the character itself is returned.
U_STABLE UChar32 u_totitle (UChar32 c)
 The given character is mapped to its titlecase equivalent according to UnicodeData.txt; if none is defined, the character itself is returned.
U_STABLE UChar32 u_foldCase (UChar32 c, uint32_t options)
 The given character is mapped to its case folding equivalent according to UnicodeData.txt and CaseFolding.txt; if the character has no case folding equivalent, the character itself is returned.
U_STABLE int32_t u_digit (UChar32 ch, int8_t radix)
 Returns the decimal digit value of the code point in the specified radix.
U_STABLE UChar32 u_forDigit (int32_t digit, int8_t radix)
 Determines the character representation for a specific digit in the specified radix.
U_STABLE void u_charAge (UChar32 c, UVersionInfo versionArray)
 Get the "age" of the code point.
U_STABLE void u_getUnicodeVersion (UVersionInfo versionArray)
 Gets the Unicode version information.
U_STABLE int32_t u_getFC_NFKC_Closure (UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode)
 Get the FC_NFKC_Closure property string for a character.


Detailed Description

C API: Unicode Properties.

This C API provides low-level access to the Unicode Character Database. In addition to raw property values, some convenience functions calculate derived properties, for example for Java-style programming.

Unicode assigns each code point (not just assigned character) values for many properties. Most of them are simple boolean flags, or constants from a small enumerated list. For some properties, values are strings or other relatively more complex types.

For more information see "About the Unicode Character Database" (http://www.unicode.org/ucd/) and the ICU User Guide chapter on Properties (http://icu.sourceforge.net/userguide/properties.html).

Many functions are designed to match java.lang.Character functions. See the individual function documentation, and see the JDK 1.4 java.lang.Character documentation at http://java.sun.com/j2se/1.4/docs/api/java/lang/Character.html

There are also functions that provide easy migration from C/POSIX functions like isblank(). Their use is generally discouraged because the C/POSIX standards do not define their semantics beyond the ASCII range, which means that different implementations exhibit very different behavior. Instead, Unicode properties should be used directly.

There are also only a few, broad C/POSIX character classes, and they tend to be used for conflicting purposes. For example, the "isalpha()" class is sometimes used to determine word boundaries, while a more sophisticated approach would at least distinguish initial letters from continuation characters (the latter including combining marks). (In ICU, BreakIterator is the most sophisticated API for word boundaries.) Another example: There is no "istitle()" class for titlecase characters.

ICU 3.4 and later provides API access for all twelve C/POSIX character classes. ICU implements them according to the Standard Recommendations in Annex C: Compatibility Properties of UTS #18 Unicode Regular Expressions (http://www.unicode.org/reports/tr18/#Compatibility_Properties).

API access for C/POSIX character classes is as follows:

Note: Some of the u_isxyz() functions in uchar.h predate, and do not match, the Standard Recommendations in UTS #18. Instead, they match Java functions according to their API documentation.

The C/POSIX character classes are also available in UnicodeSet patterns, using patterns like [:graph:] or \p{graph}.

Note: There are several ICU whitespace functions. Comparison:

Definition in file uchar.h.


Define Documentation

#define U_FOLD_CASE_DEFAULT   0
 

Option value for case folding: use default mappings defined in CaseFolding.txt.

Stable:
ICU 2.0

Definition at line 2817 of file uchar.h.

#define U_FOLD_CASE_EXCLUDE_SPECIAL_I   1
 

Option value for case folding:.

Use the modified set of mappings provided in CaseFolding.txt to handle dotted I and dotless i appropriately for Turkic languages (tr, az).

Before Unicode 3.2, CaseFolding.txt contains mappings marked with 'I' that are to be included for default mappings and excluded for the Turkic-specific mappings.

Unicode 3.2 CaseFolding.txt instead contains mappings marked with 'T' that are to be excluded for default mappings and included for the Turkic-specific mappings.

Stable:
ICU 2.0

Definition at line 2835 of file uchar.h.

#define U_GC_C_MASK   (U_GC_CN_MASK|U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CO_MASK|U_GC_CS_MASK)
 

Mask constant for multiple UCharCategory bits (C Others).

Stable:
ICU 2.1

Definition at line 749 of file uchar.h.

#define U_GC_CC_MASK   U_MASK(U_CONTROL_CHAR)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 697 of file uchar.h.

#define U_GC_CF_MASK   U_MASK(U_FORMAT_CHAR)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 699 of file uchar.h.

#define U_GC_CN_MASK   U_MASK(U_GENERAL_OTHER_TYPES)
 

U_GC_XX_MASK constants are bit flags corresponding to Unicode general category values.

For each category, the nth bit is set if the numeric value of the corresponding UCharCategory constant is n.

There are also some U_GC_Y_MASK constants for groups of general categories like L for all letter categories.

See also:
u_charType

U_GET_GC_MASK

UCharCategory

Stable:
ICU 2.1

Definition at line 662 of file uchar.h.

#define U_GC_CO_MASK   U_MASK(U_PRIVATE_USE_CHAR)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 701 of file uchar.h.

#define U_GC_CS_MASK   U_MASK(U_SURROGATE)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 703 of file uchar.h.

#define U_GC_L_MASK   (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK|U_GC_LM_MASK|U_GC_LO_MASK)
 

Mask constant for multiple UCharCategory bits (L Letters).

Stable:
ICU 2.1

Definition at line 732 of file uchar.h.

#define U_GC_LC_MASK   (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK)
 

Mask constant for multiple UCharCategory bits (LC Cased Letters).

Stable:
ICU 2.1

Definition at line 736 of file uchar.h.

#define U_GC_LL_MASK   U_MASK(U_LOWERCASE_LETTER)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 667 of file uchar.h.

#define U_GC_LM_MASK   U_MASK(U_MODIFIER_LETTER)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 671 of file uchar.h.

#define U_GC_LO_MASK   U_MASK(U_OTHER_LETTER)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 673 of file uchar.h.

#define U_GC_LT_MASK   U_MASK(U_TITLECASE_LETTER)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 669 of file uchar.h.

#define U_GC_LU_MASK   U_MASK(U_UPPERCASE_LETTER)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 665 of file uchar.h.

#define U_GC_M_MASK   (U_GC_MN_MASK|U_GC_ME_MASK|U_GC_MC_MASK)
 

Mask constant for multiple UCharCategory bits (M Marks).

Stable:
ICU 2.1

Definition at line 740 of file uchar.h.

#define U_GC_MC_MASK   U_MASK(U_COMBINING_SPACING_MARK)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 680 of file uchar.h.

#define U_GC_ME_MASK   U_MASK(U_ENCLOSING_MARK)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 678 of file uchar.h.

#define U_GC_MN_MASK   U_MASK(U_NON_SPACING_MARK)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 676 of file uchar.h.

#define U_GC_N_MASK   (U_GC_ND_MASK|U_GC_NL_MASK|U_GC_NO_MASK)
 

Mask constant for multiple UCharCategory bits (N Numbers).

Stable:
ICU 2.1

Definition at line 743 of file uchar.h.

#define U_GC_ND_MASK   U_MASK(U_DECIMAL_DIGIT_NUMBER)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 683 of file uchar.h.

#define U_GC_NL_MASK   U_MASK(U_LETTER_NUMBER)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 685 of file uchar.h.

#define U_GC_NO_MASK   U_MASK(U_OTHER_NUMBER)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 687 of file uchar.h.

#define U_GC_P_MASK
 

Value:

Mask constant for multiple UCharCategory bits (P Punctuation).

Stable:
ICU 2.1

Definition at line 753 of file uchar.h.

#define U_GC_PC_MASK   U_MASK(U_CONNECTOR_PUNCTUATION)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 712 of file uchar.h.

#define U_GC_PD_MASK   U_MASK(U_DASH_PUNCTUATION)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 706 of file uchar.h.

#define U_GC_PE_MASK   U_MASK(U_END_PUNCTUATION)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 710 of file uchar.h.

#define U_GC_PF_MASK   U_MASK(U_FINAL_PUNCTUATION)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 728 of file uchar.h.

#define U_GC_PI_MASK   U_MASK(U_INITIAL_PUNCTUATION)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 726 of file uchar.h.

#define U_GC_PO_MASK   U_MASK(U_OTHER_PUNCTUATION)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 714 of file uchar.h.

#define U_GC_PS_MASK   U_MASK(U_START_PUNCTUATION)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 708 of file uchar.h.

#define U_GC_S_MASK   (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK)
 

Mask constant for multiple UCharCategory bits (S Symbols).

Stable:
ICU 2.1

Definition at line 758 of file uchar.h.

#define U_GC_SC_MASK   U_MASK(U_CURRENCY_SYMBOL)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 719 of file uchar.h.

#define U_GC_SK_MASK   U_MASK(U_MODIFIER_SYMBOL)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 721 of file uchar.h.

#define U_GC_SM_MASK   U_MASK(U_MATH_SYMBOL)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 717 of file uchar.h.

#define U_GC_SO_MASK   U_MASK(U_OTHER_SYMBOL)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 723 of file uchar.h.

#define U_GC_Z_MASK   (U_GC_ZS_MASK|U_GC_ZL_MASK|U_GC_ZP_MASK)
 

Mask constant for multiple UCharCategory bits (Z Separators).

Stable:
ICU 2.1

Definition at line 746 of file uchar.h.

#define U_GC_ZL_MASK   U_MASK(U_LINE_SEPARATOR)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 692 of file uchar.h.

#define U_GC_ZP_MASK   U_MASK(U_PARAGRAPH_SEPARATOR)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 694 of file uchar.h.

#define U_GC_ZS_MASK   U_MASK(U_SPACE_SEPARATOR)
 

Mask constant for a UCharCategory.

Stable:
ICU 2.1

Definition at line 690 of file uchar.h.

#define U_GET_GC_MASK  )     U_MASK(u_charType(c))
 

Get a single-bit bit set for the general category of a character.

This bit set can be compared bitwise with U_GC_SM_MASK, U_GC_L_MASK, etc. Same as U_MASK(u_charType(c)).

Parameters:
c the code point to be tested
Returns:
a single-bit mask corresponding to the general category (UCharCategory) value
See also:
u_charType

UCharCategory

U_GC_CN_MASK

Stable:
ICU 2.1

Definition at line 2252 of file uchar.h.

#define U_MASK  )     ((uint32_t)1<<(x))
 

Get a single-bit bit set (a flag) from a bit number 0.

.31.

Stable:
ICU 2.1

Definition at line 140 of file uchar.h.

#define U_NO_NUMERIC_VALUE   ((double)-123456789.)
 

Special value that is returned by u_getNumericValue when no numeric value is defined for a code point.

See also:
u_getNumericValue
Stable:
ICU 2.2

Definition at line 1765 of file uchar.h.

#define U_UNICODE_VERSION   "4.1"
 

Unicode version number, default for the current ICU version.

The actual Unicode Character Database (UCD) data is stored in uprops.dat and may be generated from UCD files from a different Unicode version. Call u_getUnicodeVersion to get the actual Unicode version of the data.

See also:
u_getUnicodeVersion
Stable:
ICU 2.0

Definition at line 42 of file uchar.h.

#define UCHAR_MAX_VALUE   0x10ffff
 

The highest Unicode code point value (scalar value) according to The Unicode Standard.

This is a 21-bit value (20.1 bits, rounded up). For a single character, UChar32 is a simple type that can hold any code point value.

See also:
UChar32
Stable:
ICU 2.0

Definition at line 134 of file uchar.h.

#define UCHAR_MIN_VALUE   0
 

The lowest Unicode code point value.

Code points are non-negative.

Stable:
ICU 2.0

Definition at line 124 of file uchar.h.


Typedef Documentation

typedef enum UBlockCode UBlockCode
 

Stable:
ICU 2.0

Definition at line 1244 of file uchar.h.

typedef enum UCharCategory UCharCategory
 

Data for enumerated Unicode general category types.

See http://www.unicode.org/Public/UNIDATA/UnicodeData.html .

Stable:
ICU 2.0

typedef enum UCharDirection UCharDirection
 

This specifies the language directional property of a character set.

Stable:
ICU 2.0

typedef UBool U_CALLCONV UCharEnumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory type)
 

Callback from u_enumCharTypes(), is called for each contiguous range of code points c (where start<=c<limit) with the same Unicode general category ("character type").

The callback function can stop the enumeration by returning FALSE.

Parameters:
context an opaque pointer, as passed into utrie_enum()
start the first code point in a contiguous range with value
limit one past the last code point in a contiguous range with value
type the general category for all code points in [start..limit[
Returns:
FALSE to stop the enumeration
Stable:
ICU 2.1
See also:
UCharCategory

u_enumCharTypes

Definition at line 2272 of file uchar.h.

typedef enum UCharNameChoice UCharNameChoice
 

Selector constants for u_charName().

u_charName() returns the "modern" name of a Unicode character; or the name that was defined in Unicode version 1.0, before the Unicode standard merged with ISO-10646; or an "extended" name that gives each Unicode code point a unique name.

See also:
u_charName
Stable:
ICU 2.0

typedef enum UDecompositionType UDecompositionType
 

Decomposition Type constants.

See also:
UCHAR_DECOMPOSITION_TYPE
Stable:
ICU 2.2

typedef enum UEastAsianWidth UEastAsianWidth
 

East Asian Width constants.

See also:
UCHAR_EAST_ASIAN_WIDTH

u_getIntPropertyValue

Stable:
ICU 2.2

typedef UBool UEnumCharNamesFn(void *context, UChar32 code, UCharNameChoice nameChoice, const char *name, int32_t length)
 

Type of a callback function for u_enumCharNames() that gets called for each Unicode character with the code point value and the character name.

If such a function returns FALSE, then the enumeration is stopped.

Parameters:
context The context pointer that was passed to u_enumCharNames().
code The Unicode code point for the character with this name.
nameChoice Selector for which kind of names is enumerated.
name The character's name, zero-terminated.
length The length of the name.
Returns:
TRUE if the enumeration should continue, FALSE to stop it.
See also:
UCharNameChoice

u_enumCharNames

Stable:
ICU 1.7

Definition at line 2454 of file uchar.h.

typedef enum UGraphemeClusterBreak UGraphemeClusterBreak
 

Grapheme Cluster Break constants.

See also:
UCHAR_GRAPHEME_CLUSTER_BREAK
Draft:
This API may be changed in the future versions and was introduced in ICU 3.4

typedef enum UHangulSyllableType UHangulSyllableType
 

Hangul Syllable Type constants.

See also:
UCHAR_HANGUL_SYLLABLE_TYPE
Stable:
ICU 2.6

typedef enum UJoiningGroup UJoiningGroup
 

Joining Group constants.

See also:
UCHAR_JOINING_GROUP
Stable:
ICU 2.2

typedef enum UJoiningType UJoiningType
 

Joining Type constants.

See also:
UCHAR_JOINING_TYPE
Stable:
ICU 2.2

typedef enum ULineBreak ULineBreak
 

Line Break constants.

See also:
UCHAR_LINE_BREAK
Stable:
ICU 2.2

typedef enum UNumericType UNumericType
 

Numeric Type constants.

See also:
UCHAR_NUMERIC_TYPE
Stable:
ICU 2.2

typedef enum UProperty UProperty
 

Selection constants for Unicode properties.

These constants are used in functions like u_hasBinaryProperty to select one of the Unicode properties.

The properties APIs are intended to reflect Unicode properties as defined in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). For details about the properties see http://www.unicode.org/ucd/ . For names of Unicode properties see the UCD file PropertyAliases.txt.

Important: If ICU is built with UCD files from Unicode versions below, e.g., 3.2, then properties marked with "new in Unicode 3.2" are not or not fully available. Check u_getUnicodeVersion to be sure.

See also:
u_hasBinaryProperty

u_getIntPropertyValue

u_getUnicodeVersion

Stable:
ICU 2.1

typedef enum UPropertyNameChoice UPropertyNameChoice
 

Selector constants for u_getPropertyName() and u_getPropertyValueName().

These selectors are used to choose which name is returned for a given property or value. All properties and values have a long name. Most have a short name, but some do not. Unicode allows for additional names, beyond the long and short name, which would be indicated by U_LONG_PROPERTY_NAME + i, where i=1, 2,...

See also:
u_getPropertyName()

u_getPropertyValueName()

Stable:
ICU 2.4

typedef enum USentenceBreak USentenceBreak
 

Sentence Break constants.

See also:
UCHAR_SENTENCE_BREAK
Draft:
This API may be changed in the future versions and was introduced in ICU 3.4

typedef enum UWordBreakValues UWordBreakValues
 

Word Break constants.

(UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.)

See also:
UCHAR_WORD_BREAK
Draft:
This API may be changed in the future versions and was introduced in ICU 3.4


Function Documentation

U_STABLE void u_charAge UChar32  c,
UVersionInfo  versionArray
 

Get the "age" of the code point.

The "age" is the Unicode version when the code point was first designated (as a non-character or for Private Use) or assigned a character. This can be useful to avoid emitting code points to receiving processes that do not accept newer characters. The data is from the UCD file DerivedAge.txt.

Parameters:
c The code point.
versionArray The Unicode version number array, to be filled in.
Stable:
ICU 2.1

U_STABLE int32_t u_charDigitValue UChar32  c  ) 
 

Returns the decimal digit value of a decimal digit character.

Such characters have the general category "Nd" (decimal digit numbers) and a Numeric_Type of Decimal.

Unlike ICU releases before 2.6, no digit values are returned for any Han characters because Han number characters are often used with a special Chinese-style number format (with characters for powers of 10 in between) instead of in decimal-positional notation. Unicode 4 explicitly assigns Han number characters the Numeric_Type Numeric instead of Decimal. See Jitterbug 1483 for more details.

Use u_getIntPropertyValue(c, UCHAR_NUMERIC_TYPE) and u_getNumericValue() for complete numeric Unicode properties.

Parameters:
c the code point for which to get the decimal digit value
Returns:
the decimal digit value of c, or -1 if c is not a decimal digit character
See also:
u_getNumericValue
Stable:
ICU 2.0

U_STABLE UCharDirection u_charDirection UChar32  c  ) 
 

Returns the bidirectional category value for the code point, which is used in the Unicode bidirectional algorithm (UAX #9 http://www.unicode.org/reports/tr9/).

Note that some unassigned code points have bidi values of R or AL because they are in blocks that are reserved for Right-To-Left scripts.

Same as java.lang.Character.getDirectionality()

Parameters:
c the code point to be tested
Returns:
the bidirectional category (UCharDirection) value
See also:
UCharDirection
Stable:
ICU 2.0

U_STABLE UChar32 u_charFromName UCharNameChoice  nameChoice,
const char *  name,
UErrorCode pErrorCode
 

Find a Unicode character by its name and return its code point value.

The name is matched exactly and completely. If the name does not correspond to a code point, pErrorCode is set to U_INVALID_CHAR_FOUND. A Unicode 1.0 name is matched only if it differs from the modern name. Unicode names are all uppercase. Extended names are lowercase followed by an uppercase hexadecimal number, and within angle brackets.

Parameters:
nameChoice Selector for which name to match.
name The name to match.
pErrorCode Pointer to a UErrorCode variable
Returns:
The Unicode value of the code point with the given name, or an undefined value if there is no such code point.
See also:
UCharNameChoice

u_charName

u_enumCharNames

Stable:
ICU 1.7

U_STABLE UChar32 u_charMirror UChar32  c  ) 
 

Maps the specified character to a "mirror-image" character.

For characters with the Bidi_Mirrored property, implementations sometimes need a "poor man's" mapping to another Unicode character (code point) such that the default glyph may serve as the mirror-image of the default glyph of the specified character. This is useful for text conversion to and from codepages with visual order, and for displays without glyph selecetion capabilities.

Parameters:
c the code point to be mapped
Returns:
another Unicode code point that may serve as a mirror-image substitute, or c itself if there is no such mapping or c does not have the Bidi_Mirrored property
See also:
UCHAR_BIDI_MIRRORED

u_isMirrored

Stable:
ICU 2.0

U_STABLE int32_t u_charName UChar32  code,
UCharNameChoice  nameChoice,
char *  buffer,
int32_t  bufferLength,
UErrorCode pErrorCode
 

Retrieve the name of a Unicode character.

Depending on nameChoice, the character name written into the buffer is the "modern" name or the name that was defined in Unicode version 1.0. The name contains only "invariant" characters like A-Z, 0-9, space, and '-'. Unicode 1.0 names are only retrieved if they are different from the modern names and if the data file contains the data for them. gennames may or may not be called with a command line option to include 1.0 names in unames.dat.

Parameters:
code The character (code point) for which to get the name. It must be 0<=code<=0x10ffff.
nameChoice Selector for which name to get.
buffer Destination address for copying the name. The name will always be zero-terminated. If there is no name, then the buffer will be set to the empty string.
bufferLength ==sizeof(buffer)
pErrorCode Pointer to a UErrorCode variable; check for U_SUCCESS() after u_charName() returns.
Returns:
The length of the name, or 0 if there is no name for this character. If the bufferLength is less than or equal to the length, then the buffer contains the truncated name and the returned length indicates the full length of the name. The length does not include the zero-termination.
See also:
UCharNameChoice

u_charFromName

u_enumCharNames

Stable:
ICU 2.0

U_STABLE int8_t u_charType UChar32  c  ) 
 

Returns the general category value for the code point.

Same as java.lang.Character.getType().

Parameters:
c the code point to be tested
Returns:
the general category (UCharCategory) value
See also:
UCharCategory
Stable:
ICU 2.0

U_STABLE int32_t u_digit UChar32  ch,
int8_t  radix
 

Returns the decimal digit value of the code point in the specified radix.

If the radix is not in the range 2<=radix<=36 or if the value of c is not a valid digit in the specified radix, -1 is returned. A character is a valid digit if at least one of the following is true:

  • The character has a decimal digit value. Such characters have the general category "Nd" (decimal digit numbers) and a Numeric_Type of Decimal. In this case the value is the character's decimal digit value.
  • The character is one of the uppercase Latin letters 'A' through 'Z'. In this case the value is c-'A'+10.
  • The character is one of the lowercase Latin letters 'a' through 'z'. In this case the value is ch-'a'+10.
  • Latin letters from both the ASCII range (0061..007A, 0041..005A) as well as from the Fullwidth ASCII range (FF41..FF5A, FF21..FF3A) are recognized.

Same as java.lang.Character.digit().

Parameters:
ch the code point to be tested.
radix the radix.
Returns:
the numeric value represented by the character in the specified radix, or -1 if there is no value or if the value exceeds the radix.
See also:
UCHAR_NUMERIC_TYPE

u_forDigit

u_charDigitValue

u_isdigit

Stable:
ICU 2.0

U_STABLE void u_enumCharNames UChar32  start,
UChar32  limit,
UEnumCharNamesFn fn,
void *  context,
UCharNameChoice  nameChoice,
UErrorCode pErrorCode
 

Enumerate all assigned Unicode characters between the start and limit code points (start inclusive, limit exclusive) and call a function for each, passing the code point value and the character name.

For Unicode 1.0 names, only those are enumerated that differ from the modern names.

Parameters:
start The first code point in the enumeration range.
limit One more than the last code point in the enumeration range (the first one after the range).
fn The function that is to be called for each character name.
context An arbitrary pointer that is passed to the function.
nameChoice Selector for which kind of names to enumerate.
pErrorCode Pointer to a UErrorCode variable
See also:
UCharNameChoice

UEnumCharNamesFn

u_charName

u_charFromName

Stable:
ICU 1.7

U_STABLE void u_enumCharTypes UCharEnumTypeRange enumRange,
const void *  context
 

Enumerate efficiently all code points with their Unicode general categories.

This is useful for building data structures (e.g., UnicodeSet's), for enumerating all assigned code points (type!=U_UNASSIGNED), etc.

For each contiguous range of code points with a given general category ("character type"), the UCharEnumTypeRange function is called. Adjacent ranges have different types. The Unicode Standard guarantees that the numeric value of the type is 0..31.

Parameters:
enumRange a pointer to a function that is called for each contiguous range of code points with the same general category
context an opaque pointer that is passed on to the callback function
Stable:
ICU 2.1
See also:
UCharCategory

UCharEnumTypeRange

U_STABLE UChar32 u_foldCase UChar32  c,
uint32_t  options
 

The given character is mapped to its case folding equivalent according to UnicodeData.txt and CaseFolding.txt; if the character has no case folding equivalent, the character itself is returned.

This function only returns the simple, single-code point case mapping. Full case mappings should be used whenever possible because they produce better results by working on whole strings. They take into account the string context and the language and can map to a result string with a different length as appropriate. Full case mappings are applied by the string case mapping functions, see ustring.h and the UnicodeString class. See also the User Guide chapter on C/POSIX migration: http://icu.sourceforge.net/userguide/posix.html#case_mappings

Parameters:
c the code point to be mapped
options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I
Returns:
the Simple_Case_Folding of the code point, if any; otherwise the code point itself.
Stable:
ICU 2.0

U_STABLE UChar32 u_forDigit int32_t  digit,
int8_t  radix
 

Determines the character representation for a specific digit in the specified radix.

If the value of radix is not a valid radix, or the value of digit is not a valid digit in the specified radix, the null character (U+0000) is returned.

The radix argument is valid if it is greater than or equal to 2 and less than or equal to 36. The digit argument is valid if 0 <= digit < radix.

If the digit is less than 10, then '0' + digit is returned. Otherwise, the value 'a' + digit - 10 is returned.

Same as java.lang.Character.forDigit().

Parameters:
digit the number to convert to a character.
radix the radix.
Returns:
the char representation of the specified digit in the specified radix.
See also:
u_digit

u_charDigitValue

u_isdigit

Stable:
ICU 2.0

U_STABLE uint8_t u_getCombiningClass UChar32  c  ) 
 

Returns the combining class of the code point as specified in UnicodeData.txt.

Parameters:
c the code point of the character
Returns:
the combining class of the character
Stable:
ICU 2.0

U_STABLE int32_t u_getFC_NFKC_Closure UChar32  c,
UChar *  dest,
int32_t  destCapacity,
UErrorCode pErrorCode
 

Get the FC_NFKC_Closure property string for a character.

See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure" or for "FNC": http://www.unicode.org/reports/tr15/

Parameters:
c The character (code point) for which to get the FC_NFKC_Closure string. It must be 0<=c<=0x10ffff.
dest Destination address for copying the string. The string will be zero-terminated if possible. If there is no FC_NFKC_Closure string, then the buffer will be set to the empty string.
destCapacity ==sizeof(dest)
pErrorCode Pointer to a UErrorCode variable.
Returns:
The length of the string, or 0 if there is no FC_NFKC_Closure string for this character. If the destCapacity is less than or equal to the length, then the buffer contains the truncated name and the returned length indicates the full length of the name. The length does not include the zero-termination.
Stable:
ICU 2.2

U_STABLE int32_t u_getIntPropertyMaxValue UProperty  which  ) 
 

Get the maximum value for an enumerated/integer/binary Unicode property.

Can be used together with u_getIntPropertyMinValue to allocate arrays of UnicodeSet or similar.

Examples for min/max values (for Unicode 3.2):

  • UCHAR_BIDI_CLASS: 0/18 (U_LEFT_TO_RIGHT/U_BOUNDARY_NEUTRAL)
  • UCHAR_SCRIPT: 0/45 (USCRIPT_COMMON/USCRIPT_TAGBANWA)
  • UCHAR_IDEOGRAPHIC: 0/1 (FALSE/TRUE)

For undefined UProperty constant values, min/max values will be 0/-1.

Parameters:
which UProperty selector constant, identifies which binary property to check. Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT or UCHAR_INT_START<=which<UCHAR_INT_LIMIT.
Returns:
Maximum value returned by u_getIntPropertyValue for a Unicode property. <=0 if the property selector is out of range.
See also:
UProperty

u_hasBinaryProperty

u_getUnicodeVersion

u_getIntPropertyMaxValue

u_getIntPropertyValue

Stable:
ICU 2.2

U_STABLE int32_t u_getIntPropertyMinValue UProperty  which  ) 
 

Get the minimum value for an enumerated/integer/binary Unicode property.

Can be used together with u_getIntPropertyMaxValue to allocate arrays of UnicodeSet or similar.

Parameters:
which UProperty selector constant, identifies which binary property to check. Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT or UCHAR_INT_START<=which<UCHAR_INT_LIMIT.
Returns:
Minimum value returned by u_getIntPropertyValue for a Unicode property. 0 if the property selector is out of range.
See also:
UProperty

u_hasBinaryProperty

u_getUnicodeVersion

u_getIntPropertyMaxValue

u_getIntPropertyValue

Stable:
ICU 2.2

U_STABLE int32_t u_getIntPropertyValue UChar32  c,
UProperty  which
 

Get the property value for an enumerated or integer Unicode property for a code point.

Also returns binary and mask property values.

Unicode, especially in version 3.2, defines many more properties than the original set in UnicodeData.txt.

The properties APIs are intended to reflect Unicode properties as defined in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). For details about the properties see http://www.unicode.org/ . For names of Unicode properties see the UCD file PropertyAliases.txt.

Sample usage: UEastAsianWidth ea=(UEastAsianWidth)u_getIntPropertyValue(c, UCHAR_EAST_ASIAN_WIDTH); UBool b=(UBool)u_getIntPropertyValue(c, UCHAR_IDEOGRAPHIC);

Parameters:
c Code point to test.
which UProperty selector constant, identifies which property to check. Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT or UCHAR_INT_START<=which<UCHAR_INT_LIMIT or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT.
Returns:
Numeric value that is directly the property value or, for enumerated properties, corresponds to the numeric value of the enumerated constant of the respective property value enumeration type (cast to enum type if necessary). Returns 0 or 1 (for FALSE/TRUE) for binary Unicode properties. Returns a bit-mask for mask properties. Returns 0 if 'which' is out of bounds or if the Unicode version does not have data for the property at all, or not for this code point.
See also:
UProperty

u_hasBinaryProperty

u_getIntPropertyMinValue

u_getIntPropertyMaxValue

u_getUnicodeVersion

Stable:
ICU 2.2

U_STABLE int32_t u_getISOComment UChar32  c,
char *  dest,
int32_t  destCapacity,
UErrorCode pErrorCode
 

Get the ISO 10646 comment for a character.

The ISO 10646 comment is an informative field in the Unicode Character Database (UnicodeData.txt field 11) and is from the ISO 10646 names list.

Parameters:
c The character (code point) for which to get the ISO comment. It must be 0<=c<=0x10ffff.
dest Destination address for copying the comment. The comment will be zero-terminated if possible. If there is no comment, then the buffer will be set to the empty string.
destCapacity ==sizeof(dest)
pErrorCode Pointer to a UErrorCode variable; check for U_SUCCESS() after u_getISOComment() returns.
Returns:
The length of the comment, or 0 if there is no comment for this character. If the destCapacity is less than or equal to the length, then the buffer contains the truncated name and the returned length indicates the full length of the name. The length does not include the zero-termination.
Stable:
ICU 2.2

U_STABLE double u_getNumericValue UChar32  c  ) 
 

Get the numeric value for a Unicode code point as defined in the Unicode Character Database.

A "double" return type is necessary because some numeric values are fractions, negative, or too large for int32_t.

For characters without any numeric values in the Unicode Character Database, this function will return U_NO_NUMERIC_VALUE.

Similar to java.lang.Character.getNumericValue(), but u_getNumericValue() also supports negative values, large values, and fractions, while Java's getNumericValue() returns values 10..35 for ASCII letters.

Parameters:
c Code point to get the numeric value for.
Returns:
Numeric value of c, or U_NO_NUMERIC_VALUE if none is defined.
See also:
U_NO_NUMERIC_VALUE
Stable:
ICU 2.2

U_STABLE UProperty u_getPropertyEnum const char *  alias  ) 
 

Return the UProperty enum for a given property name, as specified in the Unicode database file PropertyAliases.txt.

Short, long, and any other variants are recognized.

In addition, this function maps the synthetic names "gcm" / "General_Category_Mask" to the property UCHAR_GENERAL_CATEGORY_MASK. These names are not in PropertyAliases.txt.

Parameters:
alias the property name to be matched. The name is compared using "loose matching" as described in PropertyAliases.txt.
Returns:
a UProperty enum, or UCHAR_INVALID_CODE if the given name does not match any property.
See also:
UProperty
Stable:
ICU 2.4

U_STABLE const char* u_getPropertyName UProperty  property,
UPropertyNameChoice  nameChoice
 

Return the Unicode name for a given property, as given in the Unicode database file PropertyAliases.txt.

In addition, this function maps the property UCHAR_GENERAL_CATEGORY_MASK to the synthetic names "gcm" / "General_Category_Mask". These names are not in PropertyAliases.txt.

Parameters:
property UProperty selector other than UCHAR_INVALID_CODE. If out of range, NULL is returned.
nameChoice selector for which name to get. If out of range, NULL is returned. All properties have a long name. Most have a short name, but some do not. Unicode allows for additional names; if present these will be returned by U_LONG_PROPERTY_NAME + i, where i=1, 2,...
Returns:
a pointer to the name, or NULL if either the property or the nameChoice is out of range. If a given nameChoice returns NULL, then all larger values of nameChoice will return NULL, with one exception: if NULL is returned for U_SHORT_PROPERTY_NAME, then U_LONG_PROPERTY_NAME (and higher) may still return a non-NULL value. The returned pointer is valid until u_cleanup() is called.
See also:
UProperty

UPropertyNameChoice

Stable:
ICU 2.4

U_STABLE int32_t u_getPropertyValueEnum UProperty  property,
const char *  alias
 

Return the property value integer for a given value name, as specified in the Unicode database file PropertyValueAliases.txt.

Short, long, and any other variants are recognized.

Note: Some of the names in PropertyValueAliases.txt will only be recognized with UCHAR_GENERAL_CATEGORY_MASK, not UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" / "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P" / "Punctuation", "S" / "Symbol", and "Z" / "Separator".

Parameters:
property UProperty selector constant. Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT or UCHAR_INT_START<=which<UCHAR_INT_LIMIT or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. If out of range, UCHAR_INVALID_CODE is returned.
alias the value name to be matched. The name is compared using "loose matching" as described in PropertyValueAliases.txt.
Returns:
a value integer or UCHAR_INVALID_CODE if the given name does not match any value of the given property, or if the property is invalid. Note: U CHAR_GENERAL_CATEGORY values are not values of UCharCategory, but rather mask values produced by U_GET_GC_MASK(). This allows grouped categories such as [:L:] to be represented.
See also:
UProperty
Stable:
ICU 2.4

U_STABLE const char* u_getPropertyValueName UProperty  property,
int32_t  value,
UPropertyNameChoice  nameChoice
 

Return the Unicode name for a given property value, as given in the Unicode database file PropertyValueAliases.txt.

Note: Some of the names in PropertyValueAliases.txt can only be retrieved using UCHAR_GENERAL_CATEGORY_MASK, not UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" / "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P" / "Punctuation", "S" / "Symbol", and "Z" / "Separator".

Parameters:
property UProperty selector constant. Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT or UCHAR_INT_START<=which<UCHAR_INT_LIMIT or UCHAR_MASK_START<=which<UCHAR_MASK_LIMIT. If out of range, NULL is returned.
value selector for a value for the given property. If out of range, NULL is returned. In general, valid values range from 0 up to some maximum. There are a few exceptions: (1.) UCHAR_BLOCK values begin at the non-zero value UBLOCK_BASIC_LATIN. (2.) UCHAR_CANONICAL_COMBINING_CLASS values are not contiguous and range from 0..240. (3.) UCHAR_GENERAL_CATEGORY_MASK values are not values of UCharCategory, but rather mask values produced by U_GET_GC_MASK(). This allows grouped categories such as [:L:] to be represented. Mask values range non-contiguously from 1..U_GC_P_MASK.
nameChoice selector for which name to get. If out of range, NULL is returned. All values have a long name. Most have a short name, but some do not. Unicode allows for additional names; if present these will be returned by U_LONG_PROPERTY_NAME + i, where i=1, 2,...
Returns:
a pointer to the name, or NULL if either the property or the nameChoice is out of range. If a given nameChoice returns NULL, then all larger values of nameChoice will return NULL, with one exception: if NULL is returned for U_SHORT_PROPERTY_NAME, then U_LONG_PROPERTY_NAME (and higher) may still return a non-NULL value. The returned pointer is valid until u_cleanup() is called.
See also:
UProperty

UPropertyNameChoice

Stable:
ICU 2.4

U_STABLE void u_getUnicodeVersion UVersionInfo  versionArray  ) 
 

Gets the Unicode version information.

The version array is filled in with the version information for the Unicode standard that is currently used by ICU. For example, Unicode version 3.1.1 is represented as an array with the values { 3, 1, 1, 0 }.

Parameters:
versionArray an output array that will be filled in with the Unicode version number
Stable:
ICU 2.0

U_STABLE UBool u_hasBinaryProperty UChar32  c,
UProperty  which
 

Check a binary Unicode property for a code point.

Unicode, especially in version 3.2, defines many more properties than the original set in UnicodeData.txt.

The properties APIs are intended to reflect Unicode properties as defined in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). For details about the properties see http://www.unicode.org/ucd/ . For names of Unicode properties see the UCD file PropertyAliases.txt.

Important: If ICU is built with UCD files from Unicode versions below 3.2, then properties marked with "new in Unicode 3.2" are not or not fully available.

Parameters:
c Code point to test.
which UProperty selector constant, identifies which binary property to check. Must be UCHAR_BINARY_START<=which<UCHAR_BINARY_LIMIT.
Returns:
TRUE or FALSE according to the binary Unicode property value for c. Also FALSE if 'which' is out of bounds or if the Unicode version does not have data for the property at all, or not for this code point.
See also:
UProperty

u_getIntPropertyValue

u_getUnicodeVersion

Stable:
ICU 2.1

U_STABLE UBool u_isalnum UChar32  c  ) 
 

Determines whether the specified code point is an alphanumeric character (letter or digit) according to Java.

True for characters with general categories "L" (letters) and "Nd" (decimal digit numbers).

Same as java.lang.Character.isLetterOrDigit().

In addition to being equivalent to a Java function, this also serves as a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is an alphanumeric character according to Character.isLetterOrDigit()
Stable:
ICU 2.0

U_STABLE UBool u_isalpha UChar32  c  ) 
 

Determines whether the specified code point is a letter character.

True for general categories "L" (letters).

Same as java.lang.Character.isLetter().

In addition to being equivalent to a Java function, this also serves as a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a letter character
See also:
u_isdigit

u_isalnum

Stable:
ICU 2.0

U_STABLE UBool u_isbase UChar32  c  ) 
 

Determines whether the specified code point is a base character.

True for general categories "L" (letters), "N" (numbers), "Mc" (spacing combining marks), and "Me" (enclosing marks).

Note that this is different from the Unicode definition in chapter 3.5, conformance clause D13, which defines base characters to be all characters (not Cn) that do not graphically combine with preceding characters (M) and that are neither control (Cc) or format (Cf) characters.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a base character according to this function
See also:
u_isalpha

u_isdigit

Stable:
ICU 2.0

U_STABLE UBool u_isblank UChar32  c  ) 
 

Determines whether the specified code point is a "blank" or "horizontal space", a character that visibly separates words on a line.

The following are equivalent definitions:

TRUE for Unicode White_Space characters except for "vertical space controls" where "vertical space controls" are the following characters: U+000A (LF) U+000B (VT) U+000C (FF) U+000D (CR) U+0085 (NEL) U+2028 (LS) U+2029 (PS)

same as

TRUE for U+0009 (TAB) and characters with general category "Zs" (space separators) except Zero Width Space (ZWSP, U+200B).

Note: There are several ICU whitespace functions; please see the uchar.h file documentation for a detailed comparison.

This is a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a "blank"
Stable:
ICU 2.6

U_STABLE UBool u_iscntrl UChar32  c  ) 
 

Determines whether the specified code point is a control character (as defined by this function).

A control character is one of the following:

  • ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f)
  • U_CONTROL_CHAR (Cc)
  • U_FORMAT_CHAR (Cf)
  • U_LINE_SEPARATOR (Zl)
  • U_PARAGRAPH_SEPARATOR (Zp)

This is a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a control character
See also:
UCHAR_DEFAULT_IGNORABLE_CODE_POINT

u_isprint

Stable:
ICU 2.0

U_STABLE UBool u_isdefined UChar32  c  ) 
 

Determines whether the specified code point is "defined", which usually means that it is assigned a character.

True for general categories other than "Cn" (other, not assigned), i.e., true for all code points mentioned in UnicodeData.txt.

Note that non-character code points (e.g., U+FDD0) are not "defined" (they are Cn), but surrogate code points are "defined" (Cs).

Same as java.lang.Character.isDefined().

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is assigned a character
See also:
u_isdigit

u_isalpha

u_isalnum

u_isupper

u_islower

u_istitle

Stable:
ICU 2.0

U_STABLE UBool u_isdigit UChar32  c  ) 
 

Determines whether the specified code point is a digit character according to Java.

True for characters with general category "Nd" (decimal digit numbers). Beginning with Unicode 4, this is the same as testing for the Numeric_Type of Decimal.

Same as java.lang.Character.isDigit().

In addition to being equivalent to a Java function, this also serves as a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a digit character according to Character.isDigit()
Stable:
ICU 2.0

U_STABLE UBool u_isgraph UChar32  c  ) 
 

Determines whether the specified code point is a "graphic" character (printable, excluding spaces).

TRUE for all characters except those with general categories "Cc" (control codes), "Cf" (format controls), "Cs" (surrogates), "Cn" (unassigned), and "Z" (separators).

This is a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a "graphic" character
Stable:
ICU 2.6

U_STABLE UBool u_isIDIgnorable UChar32  c  ) 
 

Determines if the specified character should be regarded as an ignorable character in an identifier, according to Java.

True for characters with general category "Cf" (format controls) as well as non-whitespace ISO controls (U+0000..U+0008, U+000E..U+001B, U+007F..U+0084, U+0086..U+009F).

Same as java.lang.Character.isIdentifierIgnorable() except that Java also returns TRUE for U+0085 Next Line (it omits U+0085 from whitespace ISO controls).

Note that Unicode just recommends to ignore Cf (format controls).

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is ignorable in identifiers according to Java
See also:
UCHAR_DEFAULT_IGNORABLE_CODE_POINT

u_isIDStart

u_isIDPart

Stable:
ICU 2.0

U_STABLE UBool u_isIDPart UChar32  c  ) 
 

Determines if the specified character is permissible in an identifier according to Java.

True for characters with general categories "L" (letters), "Nl" (letter numbers), "Nd" (decimal digits), "Mc" and "Mn" (combining marks), "Pc" (connecting punctuation), and u_isIDIgnorable(c).

Same as java.lang.Character.isUnicodeIdentifierPart(). Almost the same as Unicode's ID_Continue (UCHAR_ID_CONTINUE) except that Unicode recommends to ignore Cf which is less than u_isIDIgnorable(c).

Parameters:
c the code point to be tested
Returns:
TRUE if the code point may occur in an identifier according to Java
See also:
UCHAR_ID_CONTINUE

u_isIDStart

u_isIDIgnorable

Stable:
ICU 2.0

U_STABLE UBool u_isIDStart UChar32  c  ) 
 

Determines if the specified character is permissible as the first character in an identifier according to Unicode (The Unicode Standard, Version 3.0, chapter 5.16 Identifiers).

True for characters with general categories "L" (letters) and "Nl" (letter numbers).

Same as java.lang.Character.isUnicodeIdentifierStart(). Same as UCHAR_ID_START

Parameters:
c the code point to be tested
Returns:
TRUE if the code point may start an identifier
See also:
UCHAR_ID_START

u_isalpha

u_isIDPart

Stable:
ICU 2.0

U_STABLE UBool u_isISOControl UChar32  c  ) 
 

Determines whether the specified code point is an ISO control code.

True for U+0000..U+001f and U+007f..U+009f (general category "Cc").

Same as java.lang.Character.isISOControl().

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is an ISO control code
See also:
u_iscntrl
Stable:
ICU 2.6

U_STABLE UBool u_isJavaIDPart UChar32  c  ) 
 

Determines if the specified character is permissible in a Java identifier.

In addition to u_isIDPart(c), true for characters with general category "Sc" (currency symbols).

Same as java.lang.Character.isJavaIdentifierPart().

Parameters:
c the code point to be tested
Returns:
TRUE if the code point may occur in a Java identifier
See also:
u_isIDIgnorable

u_isJavaIDStart

u_isalpha

u_isdigit

u_isIDPart

Stable:
ICU 2.0

U_STABLE UBool u_isJavaIDStart UChar32  c  ) 
 

Determines if the specified character is permissible as the first character in a Java identifier.

In addition to u_isIDStart(c), true for characters with general categories "Sc" (currency symbols) and "Pc" (connecting punctuation).

Same as java.lang.Character.isJavaIdentifierStart().

Parameters:
c the code point to be tested
Returns:
TRUE if the code point may start a Java identifier
See also:
u_isJavaIDPart

u_isalpha

u_isIDStart

Stable:
ICU 2.0

U_STABLE UBool u_isJavaSpaceChar UChar32  c  ) 
 

Determine if the specified code point is a space character according to Java.

True for characters with general categories "Z" (separators), which does not include control codes (e.g., TAB or Line Feed).

Same as java.lang.Character.isSpaceChar().

Note: There are several ICU whitespace functions; please see the uchar.h file documentation for a detailed comparison.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a space character according to Character.isSpaceChar()
See also:
u_isspace

u_isWhitespace

u_isUWhiteSpace

Stable:
ICU 2.6

U_STABLE UBool u_islower UChar32  c  ) 
 

Determines whether the specified code point has the general category "Ll" (lowercase letter).

Same as java.lang.Character.isLowerCase().

This misses some characters that are also lowercase but have a different general category value. In order to include those, use UCHAR_LOWERCASE.

In addition to being equivalent to a Java function, this also serves as a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is an Ll lowercase letter
See also:
UCHAR_LOWERCASE

u_isupper

u_istitle

Stable:
ICU 2.0

U_STABLE UBool u_isMirrored UChar32  c  ) 
 

Determines whether the code point has the Bidi_Mirrored property.

This property is set for characters that are commonly used in Right-To-Left contexts and need to be displayed with a "mirrored" glyph.

Same as java.lang.Character.isMirrored(). Same as UCHAR_BIDI_MIRRORED

Parameters:
c the code point to be tested
Returns:
TRUE if the character has the Bidi_Mirrored property
See also:
UCHAR_BIDI_MIRRORED
Stable:
ICU 2.0

U_STABLE UBool u_isprint UChar32  c  ) 
 

Determines whether the specified code point is a printable character.

True for general categories other than "C" (controls).

This is a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a printable character
See also:
UCHAR_DEFAULT_IGNORABLE_CODE_POINT

u_iscntrl

Stable:
ICU 2.0

U_STABLE UBool u_ispunct UChar32  c  ) 
 

Determines whether the specified code point is a punctuation character.

True for characters with general categories "P" (punctuation).

This is a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a punctuation character
Stable:
ICU 2.6

U_STABLE UBool u_isspace UChar32  c  ) 
 

Determines if the specified character is a space character or not.

Note: There are several ICU whitespace functions; please see the uchar.h file documentation for a detailed comparison.

This is a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the character to be tested
Returns:
true if the character is a space character; false otherwise.
See also:
u_isJavaSpaceChar

u_isWhitespace

u_isUWhiteSpace

Stable:
ICU 2.0

U_STABLE UBool u_istitle UChar32  c  ) 
 

Determines whether the specified code point is a titlecase letter.

True for general category "Lt" (titlecase letter).

Same as java.lang.Character.isTitleCase().

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is an Lt titlecase letter
See also:
u_isupper

u_islower

u_totitle

Stable:
ICU 2.0

U_STABLE UBool u_isUAlphabetic UChar32  c  ) 
 

Check if a code point has the Alphabetic Unicode property.

Same as u_hasBinaryProperty(c, UCHAR_ALPHABETIC). This is different from u_isalpha!

Parameters:
c Code point to test
Returns:
true if the code point has the Alphabetic Unicode property, false otherwise
See also:
UCHAR_ALPHABETIC

u_isalpha

u_hasBinaryProperty

Stable:
ICU 2.1

U_STABLE UBool u_isULowercase UChar32  c  ) 
 

Check if a code point has the Lowercase Unicode property.

Same as u_hasBinaryProperty(c, UCHAR_LOWERCASE). This is different from u_islower!

Parameters:
c Code point to test
Returns:
true if the code point has the Lowercase Unicode property, false otherwise
See also:
UCHAR_LOWERCASE

u_islower

u_hasBinaryProperty

Stable:
ICU 2.1

U_STABLE UBool u_isupper UChar32  c  ) 
 

Determines whether the specified code point has the general category "Lu" (uppercase letter).

Same as java.lang.Character.isUpperCase().

This misses some characters that are also uppercase but have a different general category value. In order to include those, use UCHAR_UPPERCASE.

In addition to being equivalent to a Java function, this also serves as a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is an Lu uppercase letter
See also:
UCHAR_UPPERCASE

u_islower

u_istitle

u_tolower

Stable:
ICU 2.0

U_STABLE UBool u_isUUppercase UChar32  c  ) 
 

Check if a code point has the Uppercase Unicode property.

Same as u_hasBinaryProperty(c, UCHAR_UPPERCASE). This is different from u_isupper!

Parameters:
c Code point to test
Returns:
true if the code point has the Uppercase Unicode property, false otherwise
See also:
UCHAR_UPPERCASE

u_isupper

u_hasBinaryProperty

Stable:
ICU 2.1

U_STABLE UBool u_isUWhiteSpace UChar32  c  ) 
 

Check if a code point has the White_Space Unicode property.

Same as u_hasBinaryProperty(c, UCHAR_WHITE_SPACE). This is different from both u_isspace and u_isWhitespace!

Note: There are several ICU whitespace functions; please see the uchar.h file documentation for a detailed comparison.

Parameters:
c Code point to test
Returns:
true if the code point has the White_Space Unicode property, false otherwise.
See also:
UCHAR_WHITE_SPACE

u_isWhitespace

u_isspace

u_isJavaSpaceChar

u_hasBinaryProperty

Stable:
ICU 2.1

U_STABLE UBool u_isWhitespace UChar32  c  ) 
 

Determines if the specified code point is a whitespace character according to Java/ICU.

A character is considered to be a Java whitespace character if and only if it satisfies one of the following criteria:

  • It is a Unicode separator (categories "Z"), but is not a no-break space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP).
  • It is U+0009 HORIZONTAL TABULATION.
  • It is U+000A LINE FEED.
  • It is U+000B VERTICAL TABULATION.
  • It is U+000C FORM FEED.
  • It is U+000D CARRIAGE RETURN.
  • It is U+001C FILE SEPARATOR.
  • It is U+001D GROUP SEPARATOR.
  • It is U+001E RECORD SEPARATOR.
  • It is U+001F UNIT SEPARATOR.
  • It is U+0085 NEXT LINE.

Same as java.lang.Character.isWhitespace() except that Java omits U+0085.

Note: There are several ICU whitespace functions; please see the uchar.h file documentation for a detailed comparison.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a whitespace character according to Java/ICU
See also:
u_isspace

u_isJavaSpaceChar

u_isUWhiteSpace

Stable:
ICU 2.0

U_STABLE UBool u_isxdigit UChar32  c  ) 
 

Determines whether the specified code point is a hexadecimal digit.

This is equivalent to u_digit(c, 16)>=0. True for characters with general category "Nd" (decimal digit numbers) as well as Latin letters a-f and A-F in both ASCII and Fullwidth ASCII. (That is, for letters with code points 0041..0046, 0061..0066, FF21..FF26, FF41..FF46.)

In order to narrow the definition of hexadecimal digits to only ASCII characters, use (c<=0x7f && u_isxdigit(c)).

This is a C/POSIX migration function. See the comments about C/POSIX character classification functions in the documentation at the top of this header file.

Parameters:
c the code point to be tested
Returns:
TRUE if the code point is a hexadecimal digit
Stable:
ICU 2.6

U_STABLE UChar32 u_tolower UChar32  c  ) 
 

The given character is mapped to its lowercase equivalent according to UnicodeData.txt; if the character has no lowercase equivalent, the character itself is returned.

Same as java.lang.Character.toLowerCase().

This function only returns the simple, single-code point case mapping. Full case mappings should be used whenever possible because they produce better results by working on whole strings. They take into account the string context and the language and can map to a result string with a different length as appropriate. Full case mappings are applied by the string case mapping functions, see ustring.h and the UnicodeString class. See also the User Guide chapter on C/POSIX migration: http://icu.sourceforge.net/userguide/posix.html#case_mappings

Parameters:
c the code point to be mapped
Returns:
the Simple_Lowercase_Mapping of the code point, if any; otherwise the code point itself.
Stable:
ICU 2.0

U_STABLE UChar32 u_totitle UChar32  c  ) 
 

The given character is mapped to its titlecase equivalent according to UnicodeData.txt; if none is defined, the character itself is returned.

Same as java.lang.Character.toTitleCase().

This function only returns the simple, single-code point case mapping. Full case mappings should be used whenever possible because they produce better results by working on whole strings. They take into account the string context and the language and can map to a result string with a different length as appropriate. Full case mappings are applied by the string case mapping functions, see ustring.h and the UnicodeString class. See also the User Guide chapter on C/POSIX migration: http://icu.sourceforge.net/userguide/posix.html#case_mappings

Parameters:
c the code point to be mapped
Returns:
the Simple_Titlecase_Mapping of the code point, if any; otherwise the code point itself.
Stable:
ICU 2.0

U_STABLE UChar32 u_toupper UChar32  c  ) 
 

The given character is mapped to its uppercase equivalent according to UnicodeData.txt; if the character has no uppercase equivalent, the character itself is returned.

Same as java.lang.Character.toUpperCase().

This function only returns the simple, single-code point case mapping. Full case mappings should be used whenever possible because they produce better results by working on whole strings. They take into account the string context and the language and can map to a result string with a different length as appropriate. Full case mappings are applied by the string case mapping functions, see ustring.h and the UnicodeString class. See also the User Guide chapter on C/POSIX migration: http://icu.sourceforge.net/userguide/posix.html#case_mappings

Parameters:
c the code point to be mapped
Returns:
the Simple_Uppercase_Mapping of the code point, if any; otherwise the code point itself.
Stable:
ICU 2.0

U_STABLE UBlockCode ublock_getCode UChar32  c  ) 
 

Returns the Unicode allocation block that contains the character.

Parameters:
c the code point to be tested
Returns:
the block value (UBlockCode) for c
See also:
UBlockCode
Stable:
ICU 2.0


Generated on Wed Jul 20 08:07:25 2005 for ICU 3.4 by  doxygen 1.4.2-20050421