use itertools::Itertools;
fn shifter(s: &str) -> usize {
s.split(' ')
.unique()
.map(|x| x.chars().
}
Im trying to finish up the task to calculate how many "shifter words" a given &str contains without any duplicates. "shifter word" is one that consist only of "H", "I", "N", "O", "S", "X", "Z", "M" and "W".
shifter("SOS IN THE HOME") == 2 // shifter words are "SOS" and "IN"
shifter("WHO IS SHIFTER AND WHO IS NO") == 3 // shifter words are "WHO", "IS", "NO"
shifter("TASK") == 0 // no shifter words
shifter("") == 0 // no shifter words in empty string