libosmscout
0.1
|
Classes | |
struct | character |
struct | Parser |
Parse and transform an UTF8 string. More... | |
class | UTF8String |
Typedefs | |
using | byte = uint8_t |
using | codepoint = uint32_t |
using | Transform = codepoint(*)(const character *, int context) |
functor implements desired transformation of the character It has 2 arguments: More... | |
Functions | |
static Parser::Exit | _p0 (Parser *p, byte bb) |
static Parser::Exit | _p1_u2 (Parser *p, byte bb) |
1 byte: RFC 3629:#4: Valid UTF-8 matches the following syntax 00-7F More... | |
static Parser::Exit | _p1_u3 (Parser *p, byte bb) |
static Parser::Exit | _p1_u4 (Parser *p, byte bb) |
static Parser::Exit | _p2_u3 (Parser *p, byte bb) |
static Parser::Exit | _p2_u4 (Parser *p, byte bb) |
static Parser::Exit | _p3_u4 (Parser *p, byte bb) |
static int | _u_size (codepoint u) |
static char * | _u_string (char *buf, codepoint u) |
codepoint | TransformCapitalize (const character *, int) |
codepoint | TransformLower (const character *, int) |
codepoint | TransformLower (const character *ch, [[maybe_unused]] int context) |
codepoint | TransformNop (const character *, int) |
codepoint | TransformNormalize (const character *, int) |
codepoint | TransformTransliterate (const character *, int) |
codepoint | TransformUpper (const character *, int) |
codepoint | TransformUpper (const character *ch, [[maybe_unused]] int context) |
std::string | UTF8Capitalize (const std::string &text) |
std::string | UTF8Normalize (const std::string &text) |
std::string | UTF8ToLower (const std::string &text) |
std::string | UTF8ToUpper (const std::string &text) |
std::string | UTF8Transliterate (const std::string &text) |
using utf8helper::byte = typedef uint8_t |
using utf8helper::codepoint = typedef uint32_t |
using utf8helper::Transform = typedef codepoint (*)(const character*, int context) |
functor implements desired transformation of the character It has 2 arguments:
|
static |
References _p1_u2(), _p1_u3(), _p1_u4(), _u_size(), utf8helper::Parser::b, utf8helper::character::category, charmap_us7ascii, utf8helper::Parser::context, utf8helper::Parser::Continue, utf8helper::Parser::Done, utf8helper::Parser::Error, utf8helper::Parser::func, NullCodepoint, utf8helper::Parser::run, utf8helper::Parser::u, and utf8helper::Parser::u_size.
Referenced by _p1_u2(), _p1_u3(), _p1_u4(), _p2_u3(), _p2_u4(), _p3_u4(), and utf8helper::Parser::Reset().
|
static |
1 byte: RFC 3629:#4: Valid UTF-8 matches the following syntax 00-7F
2 bytes: RFC 3629:#4: Valid UTF-8 matches the following syntax C2-DF 80-BF
3 bytes: RFC 3629:#4: Valid UTF-8 matches the following syntax E0 A0-BF 80-BF E1-EC 80-BF 80-BF ED 80-9F 80-BF EE-EF 80-BF 80-BF RFC 3629:#6: [EF,BB,BF] is BOM on start, else ZERO WIDTH NO-BREAK SPACE
4 bytes: RFC 3629:#4: Valid UTF-8 matches the following syntax F0 90-BF 80-BF 80-BF F1-F3 80-BF 80-BF 80-BF F4 80-8F 80-BF 80-BF
References _p0(), _u_size(), utf8helper::Parser::b, utf8helper::character::category, utf8helper::Parser::context, utf8helper::Parser::Continue, utf8helper::Parser::Done, utf8helper::Parser::func, None, NullCodepoint, pagemap_16, utf8helper::Parser::run, utf8helper::Parser::u, and utf8helper::Parser::u_size.
Referenced by _p0().
|
static |
References _p0(), _p2_u3(), utf8helper::Parser::b, utf8helper::Parser::Continue, and utf8helper::Parser::run.
Referenced by _p0().
|
static |
References _p0(), _p2_u4(), utf8helper::Parser::b, utf8helper::Parser::Continue, and utf8helper::Parser::run.
Referenced by _p0().
|
static |
References _p0(), _u_size(), utf8helper::Parser::b, utf8helper::character::category, utf8helper::Parser::context, utf8helper::Parser::Continue, utf8helper::Parser::Done, utf8helper::Parser::func, None, NullCodepoint, pagemap_24_e1, pagemap_24_e2, utf8helper::Parser::run, utf8helper::Parser::u, and utf8helper::Parser::u_size.
Referenced by _p1_u3().
|
static |
References _p0(), _p3_u4(), utf8helper::Parser::b, utf8helper::Parser::Continue, and utf8helper::Parser::run.
Referenced by _p1_u4().
|
static |
References _p0(), _u_size(), utf8helper::Parser::b, utf8helper::character::category, utf8helper::Parser::context, utf8helper::Parser::Continue, utf8helper::Parser::Done, utf8helper::Parser::func, None, NullCodepoint, pagemap_32_f0_90, pagemap_32_f0_9e, utf8helper::Parser::run, utf8helper::Parser::u, and utf8helper::Parser::u_size.
Referenced by _p2_u4().
|
inlinestatic |
Referenced by _p0(), _p1_u2(), _p2_u3(), _p3_u4(), and utf8helper::UTF8String::Remove().
|
inlinestatic |
References IsBreaker, IsControl, IsSpace, utf8helper::character::lower, and utf8helper::character::upper.
Referenced by UTF8Capitalize().
Referenced by UTF8ToLower().
References utf8helper::character::lower.
References utf8helper::character::code.
References utf8helper::character::category, IsBreaker, IsControl, IsSpace, utf8helper::character::lower, and NullCodepoint.
Referenced by UTF8Normalize().
References utf8helper::character::category, IsSpace, NullCodepoint, and utf8helper::character::translate.
Referenced by UTF8Transliterate().
Referenced by UTF8ToUpper().
References utf8helper::character::upper.
std::string utf8helper::UTF8Capitalize | ( | const std::string & | text | ) |
References utf8helper::UTF8String::ToStdString(), and TransformCapitalize().
std::string utf8helper::UTF8Normalize | ( | const std::string & | text | ) |
References utf8helper::UTF8String::ToStdString(), and TransformNormalize().
Referenced by osmscout::UTF8NormForLookup().
std::string utf8helper::UTF8ToLower | ( | const std::string & | text | ) |
References utf8helper::UTF8String::ToStdString(), and TransformLower().
Referenced by osmscout::UTF8StringToLower().
std::string utf8helper::UTF8ToUpper | ( | const std::string & | text | ) |
References utf8helper::UTF8String::ToStdString(), and TransformUpper().
Referenced by osmscout::UTF8StringToUpper().
std::string utf8helper::UTF8Transliterate | ( | const std::string & | text | ) |
References utf8helper::UTF8String::ToStdString(), and TransformTransliterate().
Referenced by osmscout::UTF8Transliterate().
const character utf8helper::charmap_c2 |
const character utf8helper::charmap_c3 |
const character utf8helper::charmap_c4 |
const character utf8helper::charmap_c5 |
const character utf8helper::charmap_c6 |
const character utf8helper::charmap_c7 |
const character utf8helper::charmap_c8 |
const character utf8helper::charmap_c9 |
const character utf8helper::charmap_ca |
const character utf8helper::charmap_cb |
const character utf8helper::charmap_cc |
const character utf8helper::charmap_cd |
const character utf8helper::charmap_ce |
const character utf8helper::charmap_cf |
const character utf8helper::charmap_d0 |
const character utf8helper::charmap_d1 |
const character utf8helper::charmap_d2 |
const character utf8helper::charmap_d3 |
const character utf8helper::charmap_d4 |
const character utf8helper::charmap_d5 |
const character utf8helper::charmap_d6 |
const character utf8helper::charmap_e1_82 |
const character utf8helper::charmap_e1_83 |
const character utf8helper::charmap_e1_b8 |
const character utf8helper::charmap_e1_b9 |
const character utf8helper::charmap_e1_ba |
const character utf8helper::charmap_e1_bb |
const character utf8helper::charmap_e1_bc |
const character utf8helper::charmap_e1_bd |
const character utf8helper::charmap_e1_be |
const character utf8helper::charmap_e1_bf |
const character utf8helper::charmap_e2_80 |
const character utf8helper::charmap_e2_81 |
const character utf8helper::charmap_e2_82 |
const character utf8helper::charmap_e2_b4 |
const character utf8helper::charmap_f0_90_92 |
const character utf8helper::charmap_f0_90_93 |
const character utf8helper::charmap_f0_9e_a4 |
|
constexpr |
Referenced by utf8helper::Parser::Reset(), TransformCapitalize(), and TransformNormalize().
|
constexpr |
Referenced by TransformCapitalize(), and TransformNormalize().
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
Referenced by utf8helper::Parser::Reset(), TransformCapitalize(), TransformNormalize(), and TransformTransliterate().
|
constexpr |
Referenced by _p0(), _p1_u2(), _p2_u3(), _p3_u4(), utf8helper::Parser::Reset(), TransformNormalize(), and TransformTransliterate().
const character * utf8helper::pagemap_16 |
Referenced by _p1_u2().
const character * utf8helper::pagemap_24_e1 |
Referenced by _p2_u3().
const character * utf8helper::pagemap_24_e2 |
Referenced by _p2_u3().
const character * utf8helper::pagemap_32_f0_90 |
Referenced by _p3_u4().
const character * utf8helper::pagemap_32_f0_9e |
Referenced by _p3_u4().