Skip to main content

string_from_bytes

Function string_from_bytes 

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

Converts UTF-8 bytes into an owned string.

Valid input is copied into a new String. Invalid UTF-8 is returned as an error.