Function collections::str::from_utf8_owned[src]

pub fn from_utf8_owned(vv: Vec<u8>) -> Result<String, Vec<u8>>

Consumes a vector of bytes to create a new utf-8 string.

Returns Err with the original vector if the vector contains invalid UTF-8.