Glossary: Data Structures and Algorithms in Rust
String
Also written: &str, push_str, join, UTF-8
A String is a growable array of UTF-8 bytes. push_str appends in place, join glues pieces with a separator, and a &str is a borrowed view of text. Because a character can take several bytes, Rust refuses code[0].