OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OPENTREP::UTF8Handler Class Reference

Utility class for basic handling of UTF-8 encoded strings. More...

#include <opentrep/basic/UTF8Handler.hpp>

Static Public Member Functions

static std::wstring toWideString (const std::string &iSrc)
 
static std::string toSimpleString (const std::wstring &iStr)
 
static std::string displayCharString (const char *iString)
 
static std::string displaySTLWString (const std::wstring &iString)
 

Detailed Description

Utility class for basic handling of UTF-8 encoded strings.

Most of the methods have taken their inspiration from Jeff Bezanson's work in the Wikix project (see http://meta.wikimedia.org/wiki/Wikix for further details), and have been "C++-ified".

Definition at line 19 of file UTF8Handler.hpp.

Member Function Documentation

std::wstring OPENTREP::UTF8Handler::toWideString ( const std::string &  iSrc)
static

Definition at line 37 of file UTF8Handler.cpp.

References OPENTREP::offsetsFromUTF8, and OPENTREP::trailingBytesForUTF8.

std::string OPENTREP::UTF8Handler::toSimpleString ( const std::wstring &  iStr)
static

Definition at line 98 of file UTF8Handler.cpp.

std::string OPENTREP::UTF8Handler::displayCharString ( const char *  iString)
static

Display the sequence of characters for the simple C-string.

Definition at line 151 of file UTF8Handler.cpp.

std::string OPENTREP::UTF8Handler::displaySTLWString ( const std::wstring &  iString)
static

Display the sequence of characters (one by one) for the given STL wide character string.

Definition at line 172 of file UTF8Handler.cpp.


The documentation for this class was generated from the following files: