Function regex_syntax::debug::utf8_decode
source ยท pub(crate) fn utf8_decode(bytes: &[u8]) -> Option<Result<char, u8>>
Expand description
Decodes the next UTF-8 encoded codepoint from the given byte slice.
If no valid encoding of a codepoint exists at the beginning of the given byte slice, then the first byte is returned instead.
This returns None
if and only if bytes
is empty.