konst::string

Function __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.