Back to Developer Roadmap

String

src/data/roadmaps/rust/content/string@Hu1jf46OpX44nam_UvYqc.md

4.0839 B
Original Source

String

Rust's String is a growable, mutable, UTF-8 encoded string type stored on the heap. Unlike string slices (&str), String owns its data and can be modified. Create with String::from("text") or "text".to_string(). Common operations include push_str(), push(), and concatenation with + or format!() macro.

Visit the following resources to learn more: