Rust 1.99 (2024 edition) reference · 3 entries
Rust Strings
Work with String and &str: trimming, splitting, searching, replacing, building and iterating characters.
| Name | Description | Since |
|---|---|---|
String and &str methods |
Common text operations: trim, split, contains, replace, case conversion, starts_with and parse. | |
String::push_str, format! and join |
Build strings: append with push_str and push, format with format!, and join a list of strings with a separator. | |
str::chars and char_indices |
Iterate over the Unicode characters of a string (not bytes), with their byte positions when needed. |