Unicode support functions. More...
#include "global.hpp"
#include "ucs4_convert_impl.hpp"
#include "unicode_cast.hpp"
#include "serialization/unicode.hpp"
#include "log.hpp"
#include "util.hpp"
#include <cassert>
#include <limits>
Go to the source code of this file.
Namespaces | |
utf8 | |
Functions for converting Unicode wide-char strings to UTF-8 encoded strings, back and forth. | |
Macros | |
#define | ERR_GENERAL LOG_STREAM(err, lg::general()) |
Functions | |
static int | utf8::byte_size_from_utf8_first (const unsigned char ch) |
utf8::string | utf8::lowercase (const utf8::string &s) |
Returns a lowercased version of the string. More... | |
size_t | utf8::index (const utf8::string &str, const size_t index) |
Codepoint index corresponding to the nth character in a UTF-8 string. More... | |
size_t | utf8::size (const utf8::string &str) |
Length in characters of a UTF-8 string. More... | |
utf8::string & | utf8::insert (utf8::string &str, const size_t pos, const utf8::string &insert) |
Insert a UTF-8 string at the specified position. More... | |
utf8::string & | utf8::erase (utf8::string &str, const size_t start, const size_t len=std::string::npos) |
Erases a portion of a UTF-8 string. More... | |
utf8::string & | utf8::truncate (utf8::string &str, const size_t size) |
Truncates a UTF-8 string to the specified number of characters. More... | |
void | utf8::truncate_as_ucs4 (utf8::string &str, const size_t size) |
Truncates a UTF-8 string to the specified number of characters. More... | |
Variables | |
static lg::log_domain | log_engine ("engine") |
Unicode support functions.
Definition in file unicode.cpp.
#define ERR_GENERAL LOG_STREAM(err, lg::general()) |
Definition at line 34 of file unicode.cpp.
Referenced by utf8::index(), and utf8::size().
|
static |