String
Last updated
What is 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.
Free resources to learn String
- Official docsString
- Official docsstr
- Official docsWhat as a String?
- ArticleRust String (With Examples)
- VideoAll Rust string types explained
More in stage 5: Testing
String: common questions
Can I learn String in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain String in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this String tutorial for beginners?
It is lesson 29 of 122 in the free Rust roadmap, in stage 5, Testing. If you are new to Rust, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.