1 #ifndef INCLUDED_U5E_UTF8_BOUNDS 2 #define INCLUDED_U5E_UTF8_BOUNDS 5 #include <u5e/utf8_util.hpp> 6 #include <u5e/iterator_assertion.hpp> 20 template <
typename NativeIterator>
32 static bool check(NativeIterator begin, NativeIterator end) {
40 while (walkback < max_walkback && end != begin) {
57 static bool enforce(NativeIterator begin, NativeIterator end) {
68 while (walkback < max_walkback && end != begin) {
static bool is_codepoint_start(const char octet)
static bool check(NativeIterator begin, NativeIterator end)
static bool enforce(NativeIterator begin, NativeIterator end)
Check and enforce bounds of utf8 text.
static bool is_codepoint_continuation(const char octet)
static int codepoint_size(const char first_octet)
iterator_assertion< NativeIterator, char > _assertions
Basic operations necessary for implementing utf8.
Asserts the iterator is consistently defined.