How can i put a str in Box struct on mutable way (How does String works)

I wanna implement my own String struct to know how does it work :slight_smile:

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