Function std::str::from_utf8_opt

pub fn from_utf8_opt(vv: &[u8]) -> Option<~str>

Convert a vector of bytes to a new UTF-8 string, if possible. Returns None if the vector contains invalid UTF-8.