pub trait Utf8Ext<'a> { fn to_str(self) -> Result<&'a str, Utf8Error>; }
This trait is to implement some extension functions for &[u8] and Vec<u8> type.
&[u8]
Vec<u8>
Converts a slice of bytes to a string slice.
use aoko::no_std::functions::ext::*; assert_eq!("💖", [240, 159, 146, 150].to_str().unwrap());