A grapheme splitter.
Definition grapheme_splitter.hpp:89
virtual ~grapheme_splitter()
Destroys the grapheme splitter.
grapheme_splitter(const std::locale &locale_=std::locale{ "" })
Creates a grapheme splitter.
std::vector< grapheme > split(const std::string_view &string_) const
Split a string to graphemes.
A grapheme.
Definition grapheme_splitter.hpp:26
constexpr std::size_t width() const
Returns the width when using a monospace font.
Definition grapheme_splitter.hpp:70
friend constexpr bool operator==(const grapheme &one, const grapheme &another)
Returns true when one grapheme is equal to another.
Definition grapheme_splitter.hpp:50
constexpr std::size_t offset() const
Returns the offset in the UTF-8 string.
Definition grapheme_splitter.hpp:60
constexpr grapheme(std::size_t offset, std::size_t width)
Creates a grapheme.
Definition grapheme_splitter.hpp:36