Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

UChar Class Reference

Inheritance diagram for UChar:

ICU List of all members.

Private Types

typedef void * Handle
enum  Error { OK, BufferOverflow = 15 }

Static Private Member Functions

bool isError (Error e)
void testError (Error e, char[] msg)
char * toString (char[] string)
wchar * toString (wchar[] string)
uint length (char *s)
uint length (wchar *s)
char[] toArray (char *s)
wchar[] toArray (wchar *s)

Detailed Description

This 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://oss.software.ibm.com/icu/userguide/properties.html).

Many functions are designed to match java.lang.Character functions. See the individual function documentation, and see the JDK 1.4.1 java.lang.Character documentation at http://java.sun.com/j2se/1.4.1/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.

A summary of the behavior of some C/POSIX character classification implementations for Unicode is available at http://oss.software.ibm.com/cvs/icu/~checkout~/icuhtml/design/posix_classes.html

See this page for full details.

Definition at line 132 of file UChar.d.


Member Typedef Documentation

typedef void* Handle [protected, inherited]
 

Use this for the primary argument-type to most ICU functions

Definition at line 109 of file ICU.d.


Member Enumeration Documentation

enum Error [protected, inherited]
 

ICU error codes (the ones which are referenced)

Enumeration values:
OK 
BufferOverflow 

Definition at line 117 of file ICU.d.


Member Function Documentation

bool isError Error  e  )  [inline, static, protected, inherited]
 

Definition at line 127 of file ICU.d.

Referenced by UConverter::detectSignature(), UString::format(), and UConverter::this().

void testError Error  e,
char[]  msg
[inline, static, protected, inherited]
 

Definition at line 145 of file ICU.d.

Referenced by UCalendar::add(), UText::compareFolded(), UConverter::decode(), UConverter::encode(), UResourceBundle::get(), UCalendar::get(), UResourceBundle::getBinary(), UResourceBundle::getInt(), UResourceBundle::getIntVector(), UCalendar::getLimit(), UResourceBundle::getLocale(), UCalendar::getMillis(), UConverter::getName(), UResourceBundle::getNextString(), UResourceBundle::getString(), UDateFormat::getTwoDigitYearStart(), UCalendar::inDaylightTime(), UDateFormat::parse(), UCalendar::roll(), UCalendar::setDate(), UCalendar::setDateTime(), UCalendar::setMillis(), UDecimalFormat::setPattern(), UMessageFormat::setPattern(), UCalendar::setTimeZone(), UDateFormat::setTwoDigitYearStart(), UResourceBundle::this(), UNumberFormat::this(), UMessageFormat::this(), UDateFormat::this(), and UCalendar::this().

char* toString char[]  string  )  [inline, static, protected, inherited]
 

Definition at line 155 of file ICU.d.

Referenced by UConverter::compareNames(), UResourceBundle::getResource(), UResourceBundle::getString(), UCalendar::getTimeZoneName(), UMessageFormat::setLocale(), UResourceBundle::this(), UMessageFormat::this(), UDateFormat::this(), UText::toLower(), ICU::toString(), and UText::toUpper().

wchar* toString wchar[]  string  )  [inline, static, protected, inherited]
 

Definition at line 175 of file ICU.d.

References ICU::toString().

uint length char *  s  )  [inline, static, protected, inherited]
 

Definition at line 184 of file ICU.d.

References strlen().

uint length wchar *  s  )  [inline, static, protected, inherited]
 

Definition at line 193 of file ICU.d.

References wcslen().

char [] toArray char *  s  )  [inline, static, protected, inherited]
 

Definition at line 202 of file ICU.d.

References strlen().

Referenced by UConverter::detectSignature(), UResourceBundle::getKey(), UResourceBundle::getLocale(), UMessageFormat::getLocale(), and UConverter::getName().

wchar [] toArray wchar *  s  )  [inline, static, protected, inherited]
 

Definition at line 213 of file ICU.d.

References wcslen().


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:12 2004 for Mango by doxygen 1.3.6