MCPcopy Create free account
hub / github.com/boostorg/parser / starts_encoded

Function starts_encoded

include/boost/parser/detail/text/transcode_iterator.hpp:722–733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

720
721 template<typename Iter>
722 constexpr detail::enable_utf8_cp_t<Iter, bool>
723 starts_encoded(Iter first, Iter last)
724 {
725 if (first == last)
726 return true;
727
728 int const cp_bytes = boost::parser::detail::text::utf8_code_units(*first);
729 if (cp_bytes == -1 || last - first < cp_bytes)
730 return false;
731
732 return !detail::end_of_invalid_utf8(first);
733 }
734
735 template<typename Iter>
736 constexpr detail::enable_utf16_cp_t<Iter, bool>

Callers 2

ends_encodedFunction · 0.85

Calls 4

utf8_code_unitsFunction · 0.85
end_of_invalid_utf8Function · 0.85
utf16_code_unitsFunction · 0.85
low_surrogateFunction · 0.85

Tested by

no test coverage detected