Function from_utf8_mut
const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error>
Converts a mutable slice of bytes to a mutable string slice.
This is an alias to str::from_utf8_mut.
Examples
Basic usage:
use str;
// "Hello, Rust!" as a mutable vector
let mut hellorust = vec!;
// As we know these bytes are valid, we can use `unwrap()`
let outstr = strfrom_utf8_mut.unwrap;
assert_eq!;
Incorrect bytes:
use str;
// Some invalid bytes in a mutable vector
let mut invalid = vec!;
assert!;
See the docs for Utf8Error for more details on the kinds of
errors that can be returned.