ucommon
7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc.. Fossies Dox: ucommon-7.0.0.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file. 33 #ifndef _UCOMMON_UNICODE_H_ 34 #define _UCOMMON_UNICODE_H_ 36 #ifndef _UCOMMON_STRING_H_ 78 static const unsigned ucsize;
83 static const char *
nil;
90 static unsigned size(
const char *codepoint);
97 static size_t count(
const char *
string);
105 static char *offset(
char *
string, ssize_t position);
112 static ucs4_t codepoint(
const char *encoded);
119 static size_t chars(
const unicode_t string);
126 static size_t chars(
ucs4_t character);
134 static size_t unpack(
const unicode_t string,
char *text,
size_t size);
143 static size_t pack(
unicode_t unicode,
const char *cp,
size_t len);
148 static ucs4_t *udup(
const char *
string);
153 static ucs2_t *wdup(
const char *
string);
162 static const char *find(
const char *
string,
ucs4_t character,
size_t start = 0);
171 static const char *rfind(
const char *
string,
ucs4_t character,
size_t end = (
size_t)-1l);
179 static unsigned ccount(
const char *
string,
ucs4_t character);
186 static ucs4_t get(
const char *cp);
194 static void put(
ucs4_t character,
char *buf);
229 UString(
const char *text,
size_t size);
258 UString get(
size_t codepoint,
size_t size = 0)
const;
266 size_t get(
unicode_t unicode,
size_t size)
const;
285 ucs4_t at(
int position)
const;
294 return get(unicode, size);
303 UString operator()(
int codepoint,
size_t size)
const;
311 return operator()(0, size);
320 return operator()(-((
int)offset), 0);
330 return operator()((
int)offset, size);
338 void cut(
size_t offset,
size_t size = 0);
346 void paste(
size_t offset,
const char *text,
size_t size = 0);
355 const char *operator()(
int offset)
const;
379 unsigned ccount(
ucs4_t character)
const;
387 const char *find(
ucs4_t character,
size_t start = 0)
const;
395 const char *rfind(
ucs4_t character,
size_t end = npos)
const;
470 inline operator bool()
const {
487 ucs4_t operator[](
long codepoint)
const;
512 return (
const char *)text == string;
521 return (
const char *)text != string;
544 inline operator char*()
const {
552 inline size_t len(
void)
const {
size_t operator()(unicode_t unicode, size_t size) const
ucs4_t at(int position) const
void dupfree< unicode_t >(unicode_t string)
std::string & operator+(std::string &target, String &source)
bool operator!=(const char *string) const
static ucs2_t * wdup(const char *string)
UString copy(size_t offset, size_t size) const
UString left(size_t size) const
static size_t count(const char *string)
ucs2_t * strwdup(const char *string)
void dupfree< ucs4_t * >(ucs4_t *string)
static ucs4_t * udup(const char *string)
bool operator==(const char *string) const
ucs4_t operator[](int position) const
String str(Socket &so, size_t size)
ucs4_t * strudup(const char *string)
static ucs4_t codepoint(const char *encoded)
unicode_t unidup(const char *string)
void dupfree< ucs2_t * >(ucs2_t *string)
std::string & operator+=(std::string &target, String &source)
UString right(size_t offset) const