from_utf8

Function from_utf8 

Source
pub fn from_utf8(input: &[u8]) -> Option<&str>
Expand description

Almost equivalent to std::str::from_utf8. This function is provided for the fair benchmark against the stdlib’s UTF-8 conversion functions, as encoding-next always allocates a new string.