Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::base::Utf8 Class Reference

Utility class for working with UTF-8 encoded strings. More...

#include "donner/base/Utf8.h"

Static Public Member Functions

static bool IsSurrogateCodepoint (char32_t ch)
 Returns true if the codepoint is a surrogate, per https://infra.spec.whatwg.org/#surrogate.
 
static bool IsValidCodepoint (char32_t ch)
 Returns true if the codepoint is a valid UTF-8 codepoint.
 
static int SequenceLength (char leadingCh)
 
static std::tuple< char32_t, int > NextCodepoint (std::string_view str)
 
template<std::output_iterator< char > OutputIterator>
static OutputIterator Append (char32_t ch, OutputIterator it)
 

Static Public Attributes

static constexpr char32_t kUnicodeReplacementCharacter = 0xFFFD
 U+FFFD REPLACEMENT CHARACTER (�)
 
static constexpr char32_t kUnicodeMaximumAllowedCodepoint = 0x10FFFF
 The greatest codepoint defined by unicode, per https://www.w3.org/TR/css-syntax-3/#maximum-allowed-code-point.
 

Detailed Description

Utility class for working with UTF-8 encoded strings.


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