PrevUpHomeNext

Function utf8_code_units

boost::text::utf8_code_units

Synopsis

// In header: <boost/text/transcode_iterator.hpp>


constexpr int utf8_code_units(unsigned char first_unit);

Description

Given the first (and possibly only) code unit of a UTF-8-encoded code point, returns the number of bytes occupied by that code point (in the range [1, 4]). Returns a value < 0 if first_unit is not a valid initial UTF-8 code unit.


PrevUpHomeNext