come dividere una stringa per spazi rust
let mut iter = "A few words".split_whitespace();
assert_eq!(Some("A"), iter.next());
assert_eq!(Some("few"), iter.next());
assert_eq!(Some("words"), iter.next());
assert_eq!(None, iter.next());
ottenere lunghezza della stringa ruggine
my_string.chars().count()
ruggine stringa divisa in parole
// if s is your String or string slice, you can split it
s.split("separator") // by separator
s.split_whitespace() // by whitespace
s.lines() // by newlines
Regex::new(r"\s").unwrap().split("one two three") // by regex crate