Inline u8::is_utf8_char_boundary

This commit is contained in:
Konrad Borowski 2022-03-28 18:37:11 +02:00
parent 2d37f38f87
commit 12c085a057

View File

@ -809,6 +809,7 @@ impl u8 {
ascii::escape_default(self)
}
#[inline]
pub(crate) const fn is_utf8_char_boundary(self) -> bool {
// This is bit magic equivalent to: b < 128 || b >= 192
(self as i8) >= -0x40