#include <unicode.h>
Public Members | |||
![]() | ![]() | enum | { MIN_VALUE, MAX_VALUE, MAX_CHAR_LENGTH, MIN_RADIX, MAX_RADIX } |
![]() | ![]() | enum | EUnicodeGeneralTypes { UNASSIGNED, UPPERCASE_LETTER, LOWERCASE_LETTER, TITLECASE_LETTER, MODIFIER_LETTER, OTHER_LETTER, NON_SPACING_MARK, ENCLOSING_MARK, COMBINING_SPACING_MARK, DECIMAL_DIGIT_NUMBER, LETTER_NUMBER, OTHER_NUMBER, SPACE_SEPARATOR, LINE_SEPARATOR, PARAGRAPH_SEPARATOR, CONTROL, FORMAT, PRIVATE_USE, SURROGATE, DASH_PUNCTUATION, START_PUNCTUATION, END_PUNCTUATION, CONNECTOR_PUNCTUATION, OTHER_PUNCTUATION, MATH_SYMBOL, CURRENCY_SYMBOL, MODIFIER_SYMBOL, OTHER_SYMBOL, INITIAL_PUNCTUATION, FINAL_PUNCTUATION, GENERAL_TYPES_COUNT } |
![]() | ![]() | Public data for enumerated Unicode general category types. More... | |
![]() | ![]() | enum | EUnicodeScript { kBasicLatin, kLatin1Supplement, kLatinExtendedA, kLatinExtendedB, kIPAExtension, kSpacingModifier, kCombiningDiacritical, kGreek, kCyrillic, kArmenian, kHebrew, kArabic, kDevanagari, kBengali, kGurmukhi, kGujarati, kOriya, kTamil, kTelugu, kKannada, kMalayalam, kThai, kLao, kTibetan, kGeorgian, kHangulJamo, kLatinExtendedAdditional, kGreekExtended, kGeneralPunctuation, kSuperSubScript, kCurrencySymbolScript, kSymbolCombiningMark, kLetterlikeSymbol, kNumberForm, kArrow, kMathOperator, kMiscTechnical, kControlPicture, kOpticalCharacter, kEnclosedAlphanumeric, kBoxDrawing, kBlockElement, kGeometricShape, kMiscSymbol, kDingbat, kCJKSymbolPunctuation, kHiragana, kKatakana, kBopomofo, kHangulCompatibilityJamo, kKanbun, kEnclosedCJKLetterMonth, kCJKCompatibility, kCJKUnifiedIdeograph, kHangulSyllable, kHighSurrogate, kHighPrivateUseSurrogate, kLowSurrogate, kPrivateUse, kCJKCompatibilityIdeograph, kAlphabeticPresentation, kArabicPresentationA, kCombiningHalfMark, kCJKCompatibilityForm, kSmallFormVariant, kArabicPresentationB, kNoScript, kHalfwidthFullwidthForm, kScriptCount } |
![]() | ![]() | enum | EDirectionProperty { LEFT_TO_RIGHT, RIGHT_TO_LEFT, EUROPEAN_NUMBER, EUROPEAN_NUMBER_SEPARATOR, EUROPEAN_NUMBER_TERMINATOR, ARABIC_NUMBER, COMMON_NUMBER_SEPARATOR, BLOCK_SEPARATOR, SEGMENT_SEPARATOR, WHITE_SPACE_NEUTRAL, OTHER_NEUTRAL, LEFT_TO_RIGHT_EMBEDDING, LEFT_TO_RIGHT_OVERRIDE, RIGHT_TO_LEFT_ARABIC, RIGHT_TO_LEFT_EMBEDDING, RIGHT_TO_LEFT_OVERRIDE, POP_DIRECTIONAL_FORMAT, DIR_NON_SPACING_MARK, BOUNDARY_NEUTRAL } |
![]() | ![]() | This specifies the language directional property of a character set. More... | |
![]() | ![]() | enum | ECellWidths { ZERO_WIDTH, HALF_WIDTH, FULL_WIDTH, NEUTRAL } |
![]() | ![]() | Values returned by the getCellWidth() function. More... | |
Static Public Members | |||
![]() | ![]() | UBool | isSingle (UChar c) |
![]() | ![]() | Does this code unit alone represent a Unicode code point? If so, then the code point value is the same as the code unit value, or (UChar32)c . More... | |
![]() | ![]() | UBool | isLead (UChar c) |
![]() | ![]() | Is this code unit the first of a multiple-unit sequence? Being a single, lead, or trail unit are mutually exclusive properties. More... | |
![]() | ![]() | UBool | isTrail (UChar c) |
![]() | ![]() | Is this code unit one of, but not the first, of a multiple-unit sequence? Being a single, lead, or trail unit are mutually exclusive properties. More... | |
![]() | ![]() | UBool | isSurrogate (UChar32 c) |
![]() | ![]() | Is this code point a surrogate character? Surrogates are not characters; they are reserved for use in UTF-16 strings as leading and trailing code units of multiple-unit sequences for single code points. More... | |
![]() | ![]() | UBool | isUnicodeChar (UChar32 c) |
![]() | ![]() | Is this code point a Unicode character? The value range for Unicode characters is limited to 0x10ffff==MAX_VALUE, and some values within this range are reserved and not characters, too. More... | |
![]() | ![]() | UBool | isError (UChar32 c) |
![]() | ![]() | Is this code point an error value? In ICU, code point access with macros or functions does not result in a UErrorCode to be set if a code unit sequence is illegal or irregular, but instead the resulting code point will be one of few special error values. More... | |
![]() | ![]() | UBool | isValid (UChar32 c) |
![]() | ![]() | Is this code point a Unicode character, and not an error value? This is an efficient combination of isUnicodeChar(c) && !isError(c) . More... | |
![]() | ![]() | UBool | needMultipleUChar (UChar32 c) |
![]() | ![]() | When writing code units for a given code point, is more than one code unit necessary? If not, then a single UChar value of (UChar)c can be written to a UChar array. More... | |
![]() | ![]() | int32_t | charLength (UChar32 c) |
![]() | ![]() | When writing code units for a given code point, how many code units are necessary? More... | |
![]() | ![]() | int32_t | arraySize (int32_t size) |
![]() | ![]() | This function returns an average size of a UChar array compared to the size that it would need to hold similar text if UTF-16 were used. More... | |
![]() | ![]() | UBool | isLowerCase (UChar32 ch) |
![]() | ![]() | Determines whether the specified UChar is a lowercase character according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isUpperCase (UChar32 ch) |
![]() | ![]() | Determines whether the specified character is an uppercase character according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isTitleCase (UChar32 ch) |
![]() | ![]() | Determines whether the specified character is a titlecase character according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isDigit (UChar32 ch) |
![]() | ![]() | Determines whether the specified character is a digit according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isDefined (UChar32 ch) |
![]() | ![]() | Determines whether the specified numeric value is actually a defined character according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isControl (UChar32 ch) |
![]() | ![]() | Determines whether the specified character is a control character according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isPrintable (UChar32 ch) |
![]() | ![]() | Determines whether the specified character is a printable character according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isBaseForm (UChar32 ch) |
![]() | ![]() | Determines whether the specified character is of the base form according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isLetter (UChar32 ch) |
![]() | ![]() | Determines whether the specified character is a letter according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isJavaIdentifierStart (UChar32 ch) |
![]() | ![]() | A convenience method for determining if a Unicode character is allowed as the first character in a Java identifier. More... | |
![]() | ![]() | UBool | isJavaIdentifierPart (UChar32 ch) |
![]() | ![]() | A convenience method for determining if a Unicode character may be part of a Java identifier other than the starting character. More... | |
![]() | ![]() | UBool | isUnicodeIdentifierStart (UChar32 ch) |
![]() | ![]() | A convenience method for determining if a Unicode character is allowed to start in a Unicode identifier. More... | |
![]() | ![]() | UBool | isUnicodeIdentifierPart (UChar32 ch) |
![]() | ![]() | A convenience method for determining if a Unicode character may be part of a Unicode identifier other than the starting character. More... | |
![]() | ![]() | UBool | isIdentifierIgnorable (UChar32 ch) |
![]() | ![]() | A convenience method for determining if a Unicode character should be regarded as an ignorable character in a Java identifier or a Unicode identifier. More... | |
![]() | ![]() | UChar32 | toLowerCase (UChar32 ch) |
![]() | ![]() | The given character is mapped to its lowercase equivalent according to Unicode 2.1.2; if the character has no lowercase equivalent, the character itself is returned. More... | |
![]() | ![]() | UChar32 | toUpperCase (UChar32 ch) |
![]() | ![]() | The given character is mapped to its uppercase equivalent according to Unicode 2.1.2; if the character has no uppercase equivalent, the character itself is returned. More... | |
![]() | ![]() | UChar32 | toTitleCase (UChar32 ch) |
![]() | ![]() | The given character is mapped to its titlecase equivalent according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isSpaceChar (UChar32 ch) |
![]() | ![]() | Determines if the specified character is a Unicode space character according to Unicode 2.1.2. More... | |
![]() | ![]() | UBool | isWhitespace (UChar32 ch) |
![]() | ![]() | Determines if the specified character is white space according to ICU. More... | |
![]() | ![]() | int8_t | getType (UChar32 ch) |
![]() | ![]() | Returns a value indicating a character category according to Unicode 2.1.2. More... | |
![]() | ![]() | EDirectionProperty | characterDirection (UChar32 ch) |
![]() | ![]() | Returns the linguistic direction property of a character. More... | |
![]() | ![]() | UBool | isMirrored (UChar32 c) |
![]() | ![]() | Determines whether the character has the "mirrored" property. More... | |
![]() | ![]() | UChar32 | charMirror (UChar32 c) |
![]() | ![]() | Maps the specified character to a "mirror-image" character. More... | |
![]() | ![]() | EUnicodeScript | getScript (UChar32 ch) |
![]() | ![]() | Returns the script associated with a character. More... | |
![]() | ![]() | uint16_t | getCellWidth (UChar32 ch) |
![]() | ![]() | Returns a value indicating the display-cell width of the character when used in Asian text, according to the Unicode standard (see p. More... | |
![]() | ![]() | UTextOffset | getCharName (uint32_t code, char *buffer, UTextOffset bufferLength, UCharNameChoice nameChoice=U_UNICODE_CHAR_NAME) |
![]() | ![]() | Retrieve the name of a Unicode character. More... | |
![]() | ![]() | int32_t | digitValue (UChar32 ch) |
![]() | ![]() | Retrives the decimal numeric value of a digit character. More... | |
![]() | ![]() | int8_t | digit (UChar32 ch, int8_t radix) |
![]() | ![]() | Returns the numeric value of the character ch in the specified radix. More... | |
![]() | ![]() | UChar32 | forDigit (int32_t digit, int8_t radix) |
![]() | ![]() | Determines the character representation for a specific digit in the specified radix. More... | |
![]() | ![]() | void | getUnicodeVersion (UVersionInfo info) |
![]() | ![]() | Retrieves the Unicode Standard Version number that is used. More... | |
Protected Members | |||
![]() | ![]() | Unicode () | |
![]() | ![]() | Unicode (const Unicode &other) | |
![]() | ![]() | ~Unicode () | |
![]() | ![]() | const Unicode& | operator= (const Unicode &other) |
The Unicode character information, provided implicitly by the Unicode Standard, includes information about the sript (for example, symbols or control characters) to which the character belongs, as well as semantic information such as whether a character is a digit or uppercase, lowercase, or uncased.
@subclassing Do not subclass.
Definition at line 46 of file unicode.h.
enum Unicode::EUnicodeGeneralTypes |
Public data for enumerated Unicode general category types.
enum Unicode::EUnicodeScript |
enum Unicode::EDirectionProperty |
This specifies the language directional property of a character set.
enum Unicode::ECellWidths |
Values returned by the getCellWidth() function.
ZERO_WIDTH | |
HALF_WIDTH | |
FULL_WIDTH | |
NEUTRAL |
Unicode::MIN_VALUE |
The lowest Unicode code point value.
Code points are non-negative.
Unicode::MAX_VALUE |
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.
Unicode::MAX_CHAR_LENGTH |
The maximum number of code units (UChar's) per code point (UChar32).
This depends on the default UTF that the ICU library is compiled for. Currently, the only natively supported UTF is UTF-16, which means that UChar is 16 bits wide and this value is 2 (for surrogate pairs). This may change in the future.
Unicode::MIN_RADIX |
The minimum radix available for conversion to and from Strings.
The constant value of this field is the smallest value permitted for the radix argument in radix-conversion methods such as the digit
method and the forDigit
method.
Unicode::MAX_RADIX |
The maximum radix available for conversion to and from Strings.
The constant value of this field is the largest value permitted for the radix argument in radix-conversion methods such as the digit
method and the forDigit
method.
UBool Unicode::isSingle (UChar c) [inline, static]
|
Does this code unit alone represent a Unicode code point? If so, then the code point value is the same as the code unit value, or (UChar32)c
.
Being a single, lead, or trail unit are mutually exclusive properties.
c | The code unit to be tested. |
UBool Unicode::isLead (UChar c) [inline, static]
|
Is this code unit the first of a multiple-unit sequence? Being a single, lead, or trail unit are mutually exclusive properties.
c | The code unit to be tested. |
UBool Unicode::isTrail (UChar c) [inline, static]
|
Is this code unit one of, but not the first, of a multiple-unit sequence? Being a single, lead, or trail unit are mutually exclusive properties.
c | The code unit to be tested. |
UBool Unicode::isSurrogate (UChar32 c) [inline, static]
|
Is this code point a surrogate character? Surrogates are not characters; they are reserved for use in UTF-16 strings as leading and trailing code units of multiple-unit sequences for single code points.
c | The code point to be tested. |
UBool Unicode::isUnicodeChar (UChar32 c) [inline, static]
|
Is this code point a Unicode character? The value range for Unicode characters is limited to 0x10ffff==MAX_VALUE, and some values within this range are reserved and not characters, too.
Those are the surrogate values and all values where the least significant 16 bits are either 0xfffe or 0xffff.
c | The code point to be tested. |
UBool Unicode::isError (UChar32 c) [inline, static]
|
Is this code point an error value? In ICU, code point access with macros or functions does not result in a UErrorCode to be set if a code unit sequence is illegal or irregular, but instead the resulting code point will be one of few special error values.
This function tests for one of those.
c | The code point to be tested. |
UBool Unicode::isValid (UChar32 c) [inline, static]
|
Is this code point a Unicode character, and not an error value? This is an efficient combination of isUnicodeChar(c) && !isError(c)
.
c | The code point to be tested. |
UBool Unicode::needMultipleUChar (UChar32 c) [inline, static]
|
When writing code units for a given code point, is more than one code unit necessary? If not, then a single UChar value of (UChar)c
can be written to a UChar array.
Otherwise, multiple code units need to be calculated and written.
c | The code point to be tested. |
int32_t Unicode::charLength (UChar32 c) [inline, static]
|
When writing code units for a given code point, how many code units are necessary?
c | The code point to be tested. |
int32_t Unicode::arraySize (int32_t size) [inline, static]
|
This function returns an average size of a UChar array compared to the size that it would need to hold similar text if UTF-16 were used.
With UTF-16, this always returns its argument. With UTF-8, the number returned will be larger, with UTF-32, smaller. It will typically be less than size*MAX_CHAR_LENGTH
.
size | The size of the array if UTF-16 were used. |
size
itself. This may change in the future.)
UBool Unicode::isLowerCase (UChar32 ch) [inline, static]
|
Determines whether the specified UChar is a lowercase character according to Unicode 2.1.2.
ch | the character to be tested |
UBool Unicode::isUpperCase (UChar32 ch) [inline, static]
|
Determines whether the specified character is an uppercase character according to Unicode 2.1.2.
ch | the character to be tested |
UBool Unicode::isTitleCase (UChar32 ch) [inline, static]
|
Determines whether the specified character is a titlecase character according to Unicode 2.1.2.
ch | the character to be tested |
UBool Unicode::isDigit (UChar32 ch) [inline, static]
|
Determines whether the specified character is a digit according to Unicode 2.1.2.
ch | the character to be tested |
UBool Unicode::isDefined (UChar32 ch) [inline, static]
|
Determines whether the specified numeric value is actually a defined character according to Unicode 2.1.2.
ch | the character to be tested |
UBool Unicode::isControl (UChar32 ch) [inline, static]
|
Determines whether the specified character is a control character according to Unicode 2.1.2.
ch | the character to be tested |
UBool Unicode::isPrintable (UChar32 ch) [inline, static]
|
Determines whether the specified character is a printable character according to Unicode 2.1.2.
ch | the character to be tested |
UBool Unicode::isBaseForm (UChar32 ch) [inline, static]
|
Determines whether the specified character is of the base form according to Unicode 2.1.2.
ch | the character to be tested |
UBool Unicode::isLetter (UChar32 ch) [inline, static]
|
Determines whether the specified character is a letter according to Unicode 2.1.2.
ch | the character to be tested |
UBool Unicode::isJavaIdentifierStart (UChar32 ch) [inline, static]
|
A convenience method for determining if a Unicode character is allowed as the first character in a Java identifier.
A character may start a Java identifier if and only if it is one of the following:
ch | the Unicode character. |
UBool Unicode::isJavaIdentifierPart (UChar32 ch) [inline, static]
|
A convenience method for determining if a Unicode character may be part of a Java identifier other than the starting character.
A character may be part of a Java identifier if and only if it is one of the following:
ch | the Unicode character. |
UBool Unicode::isUnicodeIdentifierStart (UChar32 ch) [inline, static]
|
A convenience method for determining if a Unicode character is allowed to start in a Unicode identifier.
A character may start a Unicode identifier if and only if it is a letter.
ch | the Unicode character. |
UBool Unicode::isUnicodeIdentifierPart (UChar32 ch) [inline, static]
|
A convenience method for determining if a Unicode character may be part of a Unicode identifier other than the starting character.
A character may be part of a Unicode identifier if and only if it is one of the following:
ch | the Unicode character. |
UBool Unicode::isIdentifierIgnorable (UChar32 ch) [inline, static]
|
A convenience method for determining if a Unicode character should be regarded as an ignorable character in a Java identifier or a Unicode identifier.
The following Unicode characters are ignorable in a Java identifier or a Unicode identifier:
0x0000 through 0x0008, | ISO control characters that |
0x000E through 0x001B, | are not whitespace |
and 0x007F through 0x009F | |
0x200C through 0x200F | join controls |
0x200A through 0x200E | bidirectional controls |
0x206A through 0x206F | format controls |
0xFEFF | zero-width no-break space |
ch | the Unicode character. |
UChar32 Unicode::toLowerCase (UChar32 ch) [inline, static]
|
The given character is mapped to its lowercase equivalent according to Unicode 2.1.2; if the character has no lowercase equivalent, the character itself is returned.
A character has a lowercase equivalent if and only if a lowercase mapping is specified for the character in the Unicode 2.0 attribute table.
Unicode::toLowerCase() only deals with the general letter case conversion. For language specific case conversion behavior, use UnicodeString::toLower(). For example, the case conversion for dot-less i and dotted I in Turkish, or for final sigma in Greek.
ch | the character to be converted |
UChar32 Unicode::toUpperCase (UChar32 ch) [inline, static]
|
The given character is mapped to its uppercase equivalent according to Unicode 2.1.2; if the character has no uppercase equivalent, the character itself is returned.
Unicode::toUpperCase() only deals with the general letter case conversion. For language specific case conversion behavior, use UnicodeString::toUpper(). For example, the case conversion for dot-less i and dotted I in Turkish, or ess-zed (i.e., "sharp S") in German.
ch | the character to be converted |
UChar32 Unicode::toTitleCase (UChar32 ch) [inline, static]
|
The given character is mapped to its titlecase equivalent according to Unicode 2.1.2.
There are only four Unicode characters that are truly titlecase forms that are distinct from uppercase forms. As a rule, if a character has no true titlecase equivalent, its uppercase equivalent is returned.
A character has a titlecase equivalent if and only if a titlecase mapping is specified for the character in the Unicode 2.1.2 data.
ch | the character to be converted |
UBool Unicode::isSpaceChar (UChar32 ch) [inline, static]
|
Determines if the specified character is a Unicode space character according to Unicode 2.1.2.
ch | the character to be tested |
UBool Unicode::isWhitespace (UChar32 ch) [inline, static]
|
Determines if the specified character is white space according to ICU.
A character is considered to be an ICU whitespace character if and only if it satisfies one of the following criteria:
java.lang.Character.isWhitespace()
.
ch | the character to be tested. |
int8_t Unicode::getType (UChar32 ch) [inline, static]
|
Returns a value indicating a character category according to Unicode 2.1.2.
ch | the character to be tested |
Unicode::EDirectionProperty Unicode::characterDirection (UChar32 ch) [inline, static]
|
Returns the linguistic direction property of a character.
Returns the linguistic direction property of a character. For example, 0x0041 (letter A) has the LEFT_TO_RIGHT directional property.
UBool Unicode::isMirrored (UChar32 ch) [inline, static]
|
Determines whether the character has the "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.
c | the character (code point, Unicode scalar value) to be tested |
UChar32 Unicode::charMirror (UChar32 ch) [inline, static]
|
Maps the specified character to a "mirror-image" character.
For characters with the "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.
c | the character (code point, Unicode scalar value) to be mapped |
Unicode::EUnicodeScript Unicode::getScript (UChar32 ch) [inline, static]
|
uint16_t Unicode::getCellWidth (UChar32 ch) [inline, static]
|
Returns a value indicating the display-cell width of the character when used in Asian text, according to the Unicode standard (see p.
6-130 of The Unicode Standard, Version 2.0). The results for various characters are as follows:
ZERO_WIDTH: Characters which are considered to take up no display-cell space: control characters format characters line and paragraph separators non-spacing marks combining Hangul jungseong combining Hangul jongseong unassigned Unicode values
HALF_WIDTH: Characters which take up half a cell in standard Asian text: all characters in the General Scripts Area except combining Hangul choseong and the characters called out specifically above as ZERO_WIDTH alphabetic and Arabic presentation forms halfwidth CJK punctuation halfwidth Katakana halfwidth Hangul Jamo halfwidth forms, arrows, and shapes
FULL_WIDTH: Characters which take up a full cell in standard Asian text: combining Hangul choseong all characters in the CJK Phonetics and Symbols Area all characters in the CJK Ideographs Area all characters in the Hangul Syllables Area CJK compatibility ideographs CJK compatibility forms small form variants fullwidth ASCII fullwidth punctuation and currency signs
NEUTRAL: Characters whose cell width is context-dependent: all characters in the Symbols Area, except those specifically called out above all characters in the Surrogates Area all charcaters in the Private Use Area
For Korean text, this algorithm should work properly with properly normalized Korean text. Precomposed Hangul syllables and non-combining jamo are all considered full- width characters. For combining jamo, we treat we treat choseong (initial consonants) as double-width characters and junseong (vowels) and jongseong (final consonants) as non-spacing marks. This will work right in text that uses the precomposed choseong characters instead of teo choseong characters in a row, and which uses the choseong filler character at the beginning of syllables that don't have an initial consonant. The results may be slightly off with Korean text following different conventions.
UTextOffset Unicode::getCharName (uint32_t code, char * buffer, UTextOffset bufferLength, UCharNameChoice nameChoice = U_UNICODE_CHAR_NAME) [inline, static]
|
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 '-'.
code |
The character (code point) for which to get the name. It must be 0<=code<0x10ffff . |
buffer | Destination address for copying the name. |
bufferLength |
==sizeof(buffer) |
nameChoice |
Selector for which name to get.
|
  char buffer[100];   UTextOffset length=Unicode::getCharName(   0x284, buffer, sizeof(buffer));     // use invariant-character conversion to Unicode   UnicodeString name(buffer, length, "");
int32_t Unicode::digitValue (UChar32 ch) [inline, static]
|
Retrives the decimal numeric value of a digit character.
ch | the digit character for which to get the numeric value |
int8_t Unicode::digit (UChar32 ch, int8_t radix) [inline, static]
|
Returns the numeric value of the character ch
in the specified radix.
If the radix is not in the range MIN_RADIX
<= radix
<= MAX_RADIX
or if the value of ch
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:
isDigit
is true of the character and the Unicode decimal digit value of the character (or its single-character decomposition) is less than the specified radix. In this case the decimal digit value is returned. 'A'
through 'Z'
and its code is less than radix+ 'A'-10
. In this case, ch- 'A'+10
is returned. 'a'
through 'z'
and its code is less than radix+ 'a'-10
. In this case, ch- 'a'+10
is returned.
ch | the character to be converted. |
radix | the radix. |
UChar32 Unicode::forDigit (int32_t digit, int8_t radix) [inline, static]
|
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 MIN_RADIX
and less than or equal to MAX_RADIX
. 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.
digit | the number to convert to a character. |
radix | the radix. |
char
representation of the specified digit in the specified radix.
void Unicode::getUnicodeVersion (UVersionInfo versionArray) [inline, static]
|
Retrieves the Unicode Standard Version number that is used.
info | the version # information, the result will be filled in |
Unicode::Unicode () [protected]
|
Unicode::Unicode (const Unicode & other) [protected]
|
Unicode::~Unicode () [protected]
|
const Unicode& Unicode::operator= (const Unicode & other) [protected]
|