Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

UTF8String Class Reference

#include <Utf8String.h>

List of all members.

Public Member Functions

 UTF8String ()
 UTF8String (const std::string &s)
 UTF8String (const UTF8String &s)
unsigned int unicodeValueCount () const
UTF8String unicodeSubString (unsigned int stt, unsigned int howManyCharacters=0) const
UTF8String operator[] (unsigned int pos) const
UTF32 unicodeValueAtPosition (unsigned int pos=0) const
bool isRTL (void) const
bool isIndic (void) const
bool isArabic (void) const
SCRIPTCODE getScriptCode (void)
std::basic_string< UTF32UTF32String () const
UTF8Stringappend (const std::basic_string< UTF32 > &UTF32String)
UTF8Stringappend (const std::basic_string< UTF16 > &UTF16String)
UTF8Stringoperator+= (const std::basic_string< UTF32 > &UTF32String)
UTF8Stringoperator+= (const std::basic_string< UTF16 > &UTF16String)
UTF8Stringoperator= (const std::basic_string< UTF32 > &UTF32String)
UTF8Stringoperator= (const std::basic_string< UTF16 > &UTF16String)
 UTF8String (const std::basic_string< UTF32 > &UTF32String)
 UTF8String (const std::basic_string< UTF16 > &UTF16String)

Private Member Functions

const char * _UTF32ValueToUTF8 (UTF32 UTF32Value)


Constructor & Destructor Documentation

UTF8String::UTF8String  ) 
 

UTF8String::UTF8String const std::string &  s  ) 
 

UTF8String::UTF8String const UTF8String s  ) 
 

UTF8String::UTF8String const std::basic_string< UTF32 > &  UTF32String  ) 
 

UTF8String::UTF8String const std::basic_string< UTF16 > &  UTF16String  ) 
 


Member Function Documentation

const char * UTF8String::_UTF32ValueToUTF8 UTF32  UTF32Value  )  [private]
 

UTF8String & UTF8String::append const std::basic_string< UTF16 > &  UTF16String  ) 
 

UTF8String & UTF8String::append const std::basic_string< UTF32 > &  UTF32String  ) 
 

SCRIPTCODE UTF8String::getScriptCode void   ) 
 

getScriptCode(): Returns a script code based on the first character in the string:

bool UTF8String::isArabic void   )  const
 

isArabic()

Returns true if the string starts with a Unicode character from Arabic

bool UTF8String::isIndic void   )  const
 

isIndic()

Returns true if the string starts with a Unicode character from an Indic or Indic-derived script

bool UTF8String::isRTL void   )  const
 

isRTL()

Returns true if the string starts with a Unicode character from a script that is written right-to-left.

UTF8String & UTF8String::operator+= const std::basic_string< UTF16 > &  UTF16String  ) 
 

UTF8String & UTF8String::operator+= const std::basic_string< UTF32 > &  UTF32String  ) 
 

UTF8String & UTF8String::operator= const std::basic_string< UTF16 > &  UTF16String  ) 
 

UTF8String & UTF8String::operator= const std::basic_string< UTF32 > &  UTF32String  ) 
 

UTF8String UTF8String::operator[] unsigned int  pos  )  const
 

UTF8String UTF8String::unicodeSubString unsigned int  stt,
unsigned int  howManyCharacters = 0
const
 

UTF32 UTF8String::unicodeValueAtPosition unsigned int  pos = 0  )  const
 

unicodeValueAtPosition():

Note: The code in this method was inspired by a UTF8ToUTF32 method in the GPL'ed swunicod.cpp (c) 1998 by the CrossWire Bible Society (http://www.crosswire.org). It differs a bit from the method presented by the Unicode Consortium which relies on some static lookup-tables.

unsigned int UTF8String::unicodeValueCount  )  const
 

unicodeValueCount()

This function tells you the "length" of a UTF8 string in terms of the number of Unicode code points (values) encoded in the UTF-8 string. Since all UTF-8 continuation bytes have the pattern "10xxxxxx" (hence the mask 0x00C0), counting only those bytes that are not continuation bytes (hence "!=0x0080) directly provides the number of encoded code points:

std::basic_string< UTF32 > UTF8String::UTF32String  )  const
 

UTF32String(): Converts a UTF8String to a UTF32String


The documentation for this class was generated from the following files:
Generated on Fri Nov 18 16:24:39 2011 for MADELINE by  doxygen 1.4.4