join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
utf8.hpp File Reference
#include <join/utils.hpp>
#include <algorithm>
#include <cstring>
#include <cstddef>
#include <cstdint>
Include dependency graph for utf8.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  join::utf8::details::SequenceTable
 UTF-8 well-formed multibyte sequences indexed by lead byte. More...
 
struct  join::utf8::details::OrderTable
 rank of UTF-8 bytes in UTF-16 code unit order. More...
 

Namespaces

namespace  join
 
namespace  join::utf8
 
namespace  join::utf8::details
 

Functions

uint32_t join::utf8::details::sequenceLength (const uint8_t *cur, const uint8_t *end) noexcept
 get the length of a multibyte sequence.
 
int join::utf8::details::validateMixed (const uint8_t *cur, const uint8_t *end) noexcept
 validate UTF-8 input that may contain multibyte sequences.
 
int join::utf8::decode (const char *&cur, const char *end, uint32_t &codepoint) noexcept
 decode one codepoint from UTF-8.
 
size_t join::utf8::encode (uint32_t codepoint, char *out) noexcept
 encode one codepoint to UTF-8.
 
int join::utf8::validate (const char *first, const char *last) noexcept
 validate UTF-8 input.
 
int join::utf8::compareUtf16Order (const char *first1, const char *last1, const char *first2, const char *last2) noexcept
 compare two UTF-8 inputs in UTF-16 code unit order.
 

Variables

constexpr SequenceTable join::utf8::details::sequenceLookup {}
 UTF-8 multibyte sequences lookup table.
 
constexpr OrderTable join::utf8::details::orderLookup {}
 UTF-16 code unit order lookup table.
 
constexpr uint64_t join::utf8::details::highBits = 0x8080808080808080ULL
 mask of the high bit of each byte of a 64 bits word.