3 ms·
I think Rust strings are all Unicode native, though they can be transmuted to bytes.
by inamberclad 7y ago
I think Rust strings are all Unicode native, though they can be transmuted to bytes.
- paulddraper 7y agoIt's a bit of both. Rust strings are (guaranteed valid) UTF-8 bytes. str.len() returns the number of bytes; s.chars().count() returns the number of characters.