Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::UTF8 Struct Reference

#include <UTF8String.h>

Static Public Member Functions

static int icompare (const std::string &str, std::string::size_type pos, std::string::size_type n, std::string::const_iterator it2, std::string::const_iterator end2)
 
static int icompare (const std::string &str1, const std::string &str2)
 
static int icompare (const std::string &str1, std::string::size_type n1, const std::string &str2, std::string::size_type n2)
 
static int icompare (const std::string &str1, std::string::size_type n, const std::string &str2)
 
static int icompare (const std::string &str1, std::string::size_type pos, std::string::size_type n, const std::string &str2)
 
static int icompare (const std::string &str1, std::string::size_type pos1, std::string::size_type n1, const std::string &str2, std::string::size_type pos2, std::string::size_type n2)
 
static int icompare (const std::string &str1, std::string::size_type pos1, std::string::size_type n, const std::string &str2, std::string::size_type pos2)
 
static int icompare (const std::string &str, std::string::size_type pos, std::string::size_type n, const std::string::value_type *ptr)
 
static int icompare (const std::string &str, std::string::size_type pos, const std::string::value_type *ptr)
 
static int icompare (const std::string &str, const std::string::value_type *ptr)
 
static std::string toUpper (const std::string &str)
 
static std::string & toUpperInPlace (std::string &str)
 
static std::string toLower (const std::string &str)
 
static std::string & toLowerInPlace (std::string &str)
 
static void removeBOM (std::string &str)
 
static std::string escape (const std::string &s, bool strictJSON=false)
 
static std::string escape (const std::string::const_iterator &begin, const std::string::const_iterator &end, bool strictJSON=false)
 
static std::string unescape (const std::string &s)
 
static std::string unescape (const std::string::const_iterator &begin, const std::string::const_iterator &end)
 Creates an UTF8 string from a string that contains escaped characters.
 

Detailed Description

This class provides static methods that are UTF-8 capable variants of the same functions in Poco/String.h.

The various variants of icompare() provide case insensitive comparison for UTF-8 encoded strings.

toUpper(), toUpperInPlace(), toLower() and toLowerInPlace() provide Unicode-based character case transformation for UTF-8 encoded strings.

removeBOM() removes the UTF-8 Byte Order Mark sequence (0xEF, 0xBB, 0xBF) from the beginning of the given string, if it's there.

Definition at line 27 of file UTF8String.h.

Member Function Documentation

◆ escape() [1/2]

static std::string Poco::UTF8::escape ( const std::string & s,
bool strictJSON = false )
static

Remove the UTF-8 Byte Order Mark sequence (0xEF, 0xBB, 0xBF) from the beginning of the string, if it's there.

+ Here is the caller graph for this function:

◆ escape() [2/2]

static std::string Poco::UTF8::escape ( const std::string::const_iterator & begin,
const std::string::const_iterator & end,
bool strictJSON = false )
static

Escapes a string. Special characters like tab, backslash, ... are escaped. Unicode characters are escaped to \uxxxx. If strictJSON is true, and \v will be escaped to \u0007 and \u000B instead of \a and \v for strict JSON conformance.

◆ icompare() [1/10]

static int Poco::UTF8::icompare ( const std::string & str,
const std::string::value_type * ptr )
static

◆ icompare() [2/10]

static int Poco::UTF8::icompare ( const std::string & str,
std::string::size_type pos,
const std::string::value_type * ptr )
static

◆ icompare() [3/10]

static int Poco::UTF8::icompare ( const std::string & str,
std::string::size_type pos,
std::string::size_type n,
const std::string::value_type * ptr )
static

◆ icompare() [4/10]

static int Poco::UTF8::icompare ( const std::string & str,
std::string::size_type pos,
std::string::size_type n,
std::string::const_iterator it2,
std::string::const_iterator end2 )
static

◆ icompare() [5/10]

static int Poco::UTF8::icompare ( const std::string & str1,
const std::string & str2 )
static

◆ icompare() [6/10]

static int Poco::UTF8::icompare ( const std::string & str1,
std::string::size_type n,
const std::string & str2 )
static

◆ icompare() [7/10]

static int Poco::UTF8::icompare ( const std::string & str1,
std::string::size_type n1,
const std::string & str2,
std::string::size_type n2 )
static

◆ icompare() [8/10]

static int Poco::UTF8::icompare ( const std::string & str1,
std::string::size_type pos,
std::string::size_type n,
const std::string & str2 )
static

◆ icompare() [9/10]

static int Poco::UTF8::icompare ( const std::string & str1,
std::string::size_type pos1,
std::string::size_type n,
const std::string & str2,
std::string::size_type pos2 )
static

◆ icompare() [10/10]

static int Poco::UTF8::icompare ( const std::string & str1,
std::string::size_type pos1,
std::string::size_type n1,
const std::string & str2,
std::string::size_type pos2,
std::string::size_type n2 )
static

◆ removeBOM()

static void Poco::UTF8::removeBOM ( std::string & str)
static

◆ toLower()

static std::string Poco::UTF8::toLower ( const std::string & str)
static

◆ toLowerInPlace()

static std::string & Poco::UTF8::toLowerInPlace ( std::string & str)
static

◆ toUpper()

static std::string Poco::UTF8::toUpper ( const std::string & str)
static

◆ toUpperInPlace()

static std::string & Poco::UTF8::toUpperInPlace ( std::string & str)
static

◆ unescape() [1/2]

static std::string Poco::UTF8::unescape ( const std::string & s)
static

Escapes a string. Special characters like tab, backslash, ... are escaped. Unicode characters are escaped to \uxxxx. If strictJSON is true, and \v will be escaped to \u0007 and \u000B instead of \a and \v for strict JSON conformance.

◆ unescape() [2/2]

static std::string Poco::UTF8::unescape ( const std::string::const_iterator & begin,
const std::string::const_iterator & end )
static

Creates an UTF8 string from a string that contains escaped characters.


The documentation for this struct was generated from the following file: