html-minifier 5.0.0

This library can help you generate and minify your HTML code at the same time. It also supports to minify JS and CSS in `<style>`, `<script>` elements, and ignores the minification of `<pre>`, `<code>` and `<textarea>` elements.
Documentation
use std::{
    fmt::{self, Formatter},
    str::from_utf8_unchecked,
};

#[inline]
pub(crate) fn str_bytes_fmt(v: &[u8], f: &mut Formatter) -> Result<(), fmt::Error> {
    f.write_fmt(format_args!("{:?}", unsafe { from_utf8_unchecked(v) }))
}

#[inline]
pub(crate) const fn is_whitespace(e: u8) -> bool {
    matches!(e, 0x09..=0x0D | 0x1C..=0x20)
}

#[inline]
pub(crate) const fn is_ascii_control(e: u8) -> bool {
    matches!(e, 0..=8 | 11..=31 | 127)
}