Function konst::string::__from_u8_subslice_of_str

source ·
pub const unsafe fn __from_u8_subslice_of_str(s: &[u8]) -> &str
Expand description

Checks that the start and end are valid utf8 char boundaries when the "debug" feature is enabled.

When the "debug" feature is disabled, this is equivalent to calling core::str::from_utf8_unchecled

§Safety

The input byte slice must be a subslice of a &str, so that only the start and end need to be checked.