3 ms·
You can modify strings in place, but not their length, which makes what your talking about complex if you need to support utf8. Here’s the str method: https://
by bluejekyll 6y ago
You can modify strings in place, but not their length, which makes what your talking about complex if you need to support utf8.
Here’s the str method: https://doc.rust-lang.org/std/primitive.str.html#method.as_bytes_mut https://doc.rust-lang.org/std/primitive.str.html#method.as_b...
If you want an string that is mutable, can be extended, etc. You want to use String, and that has plenty of methods for mutation.
Remember, Rust strings are all utf8, and part of the safety contract is that they’re always valid.