[−][src]Function encoding::codec::utf_8::from_utf8
pub fn from_utf8<'a>(input: &'a [u8]) -> Option<&'a str>
Almost equivalent to std::str::from_utf8
.
This function is provided for the fair benchmark against the stdlib's UTF-8 conversion
functions, as rust-encoding always allocates a new string.