Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Header Files   Compound Members   File Members  

Unicode Class Reference

The Unicode class allows you to query the properties associated with individual Unicode character values. More...

#include <unicode.h>

List of all members.


Public Members

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

bool_t isLowerCase (UChar ch)
Determines whether the specified UChar is a lowercase character according to Unicode 2.1.2. More...

bool_t isUpperCase (UChar ch)
Determines whether the specified character is an uppercase character according to Unicode 2.1.2. More...

bool_t isTitleCase (UChar ch)
Determines whether the specified character is a titlecase character according to Unicode 2.1.2. More...

bool_t isDigit (UChar ch)
Determines whether the specified character is a digit according to Unicode 2.1.2. More...

bool_t isDefined (UChar ch)
Determines whether the specified numeric value is actually a defined character according to Unicode 2.1.2. More...

bool_t isControl (UChar ch)
Determines whether the specified character is a control character according to Unicode 2.1.2. More...

bool_t isPrintable (UChar ch)
Determines whether the specified character is a printable character according to Unicode 2.1.2. More...

bool_t isBaseForm (UChar ch)
Determines whether the specified character is of the base form according to Unicode 2.1.2. More...

bool_t isLetter (UChar ch)
Determines whether the specified character is a letter according to Unicode 2.1.2. More...

bool_t isJavaIdentifierStart (UChar ch)
A convenience method for determining if a Unicode character is allowed as the first character in a Java identifier. More...

bool_t isJavaIdentifierPart (UChar ch)
A convenience method for determining if a Unicode character may be part of a Java identifier other than the starting character. More...

bool_t isUnicodeIdentifierStart (UChar ch)
A convenience method for determining if a Unicode character is allowed to start in a Unicode identifier. More...

bool_t isUnicodeIdentifierPart (UChar ch)
A convenience method for determining if a Unicode character may be part of a Unicode identifier other than the starting character. More...

bool_t isIdentifierIgnorable (UChar 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...

UChar toLowerCase (UChar 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...

UChar toUpperCase (UChar 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...

UChar toTitleCase (UChar ch)
The given character is mapped to its titlecase equivalent according to Unicode 2.1.2. More...

bool_t isSpaceChar (UChar ch)
Determines if the specified character is a Unicode space character according to Unicode 2.1.2. More...

bool_t isWhitespace (UChar ch)
Determines if the specified character is white space according to ICU. More...

int8_t getType (UChar ch)
Returns a value indicating a character category according to Unicode 2.1.2. More...

EDirectionProperty characterDirection (UChar ch)
Returns the linguistic direction property of a character. More...

EUnicodeScript getScript (UChar ch)
Returns the script associated with a character. More...

uint16_t getCellWidth (UChar 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 (UChar ch)
Retrives the decimal numeric value of a digit character. More...

int8_t digit (UChar ch, int8_t radix)
Returns the numeric value of the character ch in the specified radix. More...

UChar 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...

const UChar MIN_VALUE
The minimum value a UChar can have. More...

const UChar MAX_VALUE
The maximum value a UChar can have. More...

const int8_t MIN_RADIX
The minimum radix available for conversion to and from Strings. More...

const int8_t MAX_RADIX
The maximum radix available for conversion to and from Strings. More...


Protected Members

 Unicode ()
 Unicode ( const Unicode& other)
 ~Unicode ()
const Unicode& operator= ( const Unicode& other)


Detailed Description

The Unicode class allows you to query the properties associated with individual Unicode character values.

The Unicode character information, provided implicitly by the Unicode character encoding 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.


Member Enumeration Documentation

enum Unicode::EUnicodeGeneralTypes

Public data for enumerated Unicode general category types.

Enumeration values:
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  

enum Unicode::EUnicodeScript

Enumeration values:
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 Unicode::EDirectionProperty

This specifies the language directional property of a character set.

Enumeration values:
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  

enum Unicode::ECellWidths

Values returned by the getCellWidth() function.

See also:
Unicode::getCellWidth()
Enumeration values:
ZERO_WIDTH  
HALF_WIDTH  
FULL_WIDTH  
NEUTRAL  

Member Function Documentation

bool_t Unicode::isLowerCase (UChar ch) [static]

Determines whether the specified UChar is a lowercase character according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
true if the character is lowercase; false otherwise.

See also:
Unicode::isUpperCase() , Unicode::isTitleCase() , Unicode::toLowerCase()
Draft:

bool_t Unicode::isUpperCase (UChar ch) [static]

Determines whether the specified character is an uppercase character according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
true if the character is uppercase; false otherwise.
See also:
Unicode::isLowerCase() , Unicode::isTitleCase() , Unicode::toUpperCase()
Draft:

bool_t Unicode::isTitleCase (UChar ch) [static]

Determines whether the specified character is a titlecase character according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
true if the character is titlecase; false otherwise.
See also:
Unicode::isUpperCase() , Unicode::isLowerCase() , Unicode::toTitleCase()
Draft:

bool_t Unicode::isDigit (UChar ch) [static]

Determines whether the specified character is a digit according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
true if the character is a digit; false otherwise.
See also:
Unicode::digit() , Unicode::forDigit() , Unicode::digitValue()
Draft:

bool_t Unicode::isDefined (UChar ch) [static]

Determines whether the specified numeric value is actually a defined character according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
true if the character has a defined Unicode meaning; false otherwise.

See also:
Unicode::isDigit() , Unicode::isLetter() , Unicode::isLetterOrDigit , Unicode::isUpperCase() , Unicode::isLowerCase() , Unicode::isTitleCase()
Draft:

bool_t Unicode::isControl (UChar ch) [static]

Determines whether the specified character is a control character according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
true if the Unicode character is a control character; false otherwise.

See also:
Unicode::isPrintable()
Draft:

bool_t Unicode::isPrintable (UChar ch) [static]

Determines whether the specified character is a printable character according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
true if the Unicode character is a printable character; false otherwise.

See also:
Unicode::isControl()
Draft:

bool_t Unicode::isBaseForm (UChar ch) [static]

Determines whether the specified character is of the base form according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
true if the Unicode character is of the base form; false otherwise.

See also:
Unicode::isLetter() , Unicode::isDigit()
Draft:

bool_t Unicode::isLetter (UChar ch) [static]

Determines whether the specified character is a letter according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
true if the character is a letter; false otherwise.

See also:
Unicode::isDigit() , Unicode::isLetterOrDigit , Unicode::isUpperCase() , Unicode::isLowerCase() , Unicode::isTitleCase()
Draft:

bool_t Unicode::isJavaIdentifierStart (UChar ch) [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:

Parameters:
ch   the Unicode character.
Returns:
TRUE if the character may start a Java identifier; FALSE otherwise.
See also:
isJavaIdentifierPart() , isLetter() , isUnicodeIdentifierStart()
Draft:

bool_t Unicode::isJavaIdentifierPart (UChar ch) [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:

Parameters:
ch   the Unicode character.
Returns:
TRUE if the character may be part of a Unicode identifier; FALSE otherwise.
See also:
isIdentifierIgnorable() , isJavaIdentifierStart() , isLetter() , isDigit() , isUnicodeIdentifierPart()
Draft:

bool_t Unicode::isUnicodeIdentifierStart (UChar ch) [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.

Parameters:
ch   the Unicode character.
Returns:
TRUE if the character may start a Unicode identifier; FALSE otherwise.
See also:
isJavaIdentifierStart() , isLetter() , isUnicodeIdentifierPart()
Draft:

bool_t Unicode::isUnicodeIdentifierPart (UChar ch) [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:

Parameters:
ch   the Unicode character.
Returns:
TRUE if the character may be part of a Unicode identifier; FALSE otherwise.
See also:
isIdentifierIgnorable() , isJavaIdentifierPart() , isLetterOrDigit , isUnicodeIdentifierStart()
Draft:

bool_t Unicode::isIdentifierIgnorable (UChar ch) [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

Parameters:
ch   the Unicode character.
Returns:
TRUE if the character may be part of a Unicode identifier; FALSE otherwise.
See also:
isJavaIdentifierPart() , isUnicodeIdentifierPart()
Draft:

UChar Unicode::toLowerCase (UChar ch) [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.

Parameters:
ch   the character to be converted
Returns:
the lowercase equivalent of the character, if any; otherwise the character itself.

See also:
UnicodeString::toLower() , Unicode::isLowerCase() , Unicode::isUpperCase() , Unicode::toUpperCase() , Unicode::toTitleCase()
Draft:

UChar Unicode::toUpperCase (UChar ch) [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.

Parameters:
ch   the character to be converted
Returns:
the uppercase equivalent of the character, if any; otherwise the character itself.

See also:
UnicodeString::toUpper() , Unicode::isUpperCase() , Unicode::isLowerCase() , Unicode::toLowerCase() , Unicode::toTitleCase()
Draft:

UChar Unicode::toTitleCase (UChar ch) [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.

Parameters:
ch   the character to be converted
Returns:
the titlecase equivalent of the character, if any; otherwise the character itself.
See also:
Unicode::isTitleCase() , Unicode::toUpperCase() , Unicode::toLowerCase()
Draft:

bool_t Unicode::isSpaceChar (UChar ch) [static]

Determines if the specified character is a Unicode space character according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
true if the character is a space character; false otherwise.
Draft:

bool_t Unicode::isWhitespace (UChar ch) [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:

Note: This method corresponds to the Java method java.lang.Character.isWhitespace().

Parameters:
ch   the character to be tested.
Returns:
true if the character is an ICU whitespace character; false otherwise.
See also:
isSpaceChar()
Draft:

int8_t Unicode::getType (UChar ch) [static]

Returns a value indicating a character category according to Unicode 2.1.2.

Parameters:
ch   the character to be tested
Returns:
a value of type int, the character category.
See also:
Unicode::UNASSIGNED , Unicode::UPPERCASE_LETTER , Unicode::LOWERCASE_LETTER , Unicode::TITLECASE_LETTER , Unicode::MODIFIER_LETTER , Unicode::OTHER_LETTER , Unicode::NON_SPACING_MARK , Unicode::ENCLOSING_MARK , Unicode::COMBINING_SPACING_MARK , Unicode::DECIMAL_DIGIT_NUMBER , Unicode::OTHER_NUMBER , Unicode::SPACE_SEPARATOR , Unicode::LINE_SEPARATOR , Unicode::PARAGRAPH_SEPARATOR , Unicode::CONTROL , Unicode::PRIVATE_USE , Unicode::SURROGATE , Unicode::DASH_PUNCTUATION , Unicode::OPEN_PUNCTUATION , Unicode::CLOSE_PUNCTUATION , Unicode::CONNECTOR_PUNCTUATION , Unicode::OTHER_PUNCTUATION , Unicode::LETTER_NUMBER , Unicode::MATH_SYMBOL , Unicode::CURRENCY_SYMBOL , Unicode::MODIFIER_SYMBOL , Unicode::OTHER_SYMBOL
Draft:

EDirectionProperty Unicode::characterDirection (UChar ch) [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.

See also:
EDirectionProperty
Draft:

EUnicodeScript Unicode::getScript (UChar ch) [static]

Returns the script associated with a character.

See also:
EUnicodeScript
Draft:

uint16_t Unicode::getCellWidth (UChar ch) [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.

Draft:

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 '-'.

Parameters:
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.

See also:
UCharNameChoice

Example:
 &#32;   char buffer[100];
 &#32;   UTextOffset length=Unicode::getCharName(
 &#32;           0x284, buffer, sizeof(buffer));
 &#32;   
 &#32;   // use invariant-character conversion to Unicode
 &#32;   UnicodeString name(buffer, length, "");
 
Draft:

int32_t Unicode::digitValue (UChar ch) [static]

Retrives the decimal numeric value of a digit character.

Parameters:
ch   the digit character for which to get the numeric value
Returns:
the numeric value of ch in decimal radix. This method returns -1 if ch is not a valid digit character.
See also:
Unicode::digit() , Unicode::forDigit() , Unicode::isDigit()
Deprecated:
HSYS: use Unicode::digit() instead.

int8_t Unicode::digit (UChar ch, int8_t radix) [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:

Parameters:
ch   the character to be converted.
radix   the radix.
Returns:
the numeric value represented by the character in the specified radix.
See also:
Unicode::MIN_RADIX , Unicode::MAX_RADIX , Unicode::forDigit() , Unicode::digitValue() , Unicode::isDigit()
Draft:

UChar Unicode::forDigit (int32_t digit, int8_t radix) [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.

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:
Unicode::MIN_RADIX , Unicode::MAX_RADIX , Unicode::digit() , Unicode::digitValue() , Unicode::isDigit()
Draft:

void Unicode::getUnicodeVersion (UVersionInfo info) [static]

Retrieves the Unicode Standard Version number that is used.

Parameters:
info   the version # information, the result will be filled in
Draft:

Unicode::Unicode () [protected]

Unicode::Unicode (const Unicode & other) [protected]

Unicode::~Unicode () [protected]

const Unicode& Unicode::operator= (const Unicode & other) [protected]


Member Data Documentation

const UChar Unicode::MIN_VALUE [static]

The minimum value a UChar can have.

The lowest value a UChar can have is 0x0000.

const UChar Unicode::MAX_VALUE [static]

The maximum value a UChar can have.

The greatest value a UChar can have is 0xffff.

const int8_t Unicode::MIN_RADIX [static]

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.

See also:
Unicode::digit() , Unicode::forDigit()

const int8_t Unicode::MAX_RADIX [static]

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.

See also:
Unicode::digit() , Unicode::forDigit()

The documentation for this class was generated from the following file:
Generated at Thu Feb 10 15:31:13 2000 for icu by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999