feat(rust): add vowel count kata

This commit is contained in:
Dmitriy Pleshevskiy 2021-11-10 01:38:35 +03:00
parent 0ed78eed50
commit c6b65c42cf

View file

@ -0,0 +1,8 @@
fn get_count(string: &str) -> usize {
string.matches(&['a', 'e', 'i', 'o', 'u'][..]).count()
}
#[test]
fn my_tests() {
assert_eq!(get_count("abracadabra"), 5);
}