Skip to main content

str_from_bytes

Function str_from_bytes 

Source
pub fn str_from_bytes(bytes: &[u8]) -> Result<&str>
Expand description

Borrows a byte slice as UTF-8 text.

Valid input is returned without allocation. Invalid UTF-8 is returned as an error.