[−][src]Trait encode_unicode::U8UtfExt
Methods for working with u8
s UTF-8.
Required methods
fn extra_utf8_bytes(self) -> Result<usize, InvalidUtf8FirstByte>
How many more bytes will you need to complete this codepoint? Failures:
128..192
: ContinuationByte240..
: TooLongSequence
fn extra_utf8_bytes_unchecked(self) -> usize
How many more bytes will you need to complete this codepoint?
Assumes that self is a valid UTF-8 start.
Returns self.not().leading_zeros().saturating_sub(1)