I wanna implement my own String struct to know how does it work
Well, the std library doesn't use a box for strings. It uses a vec, like this:
pub struct String {
vec: Vec<u8>,
}
3 Likes