8 lines
171 B
Rust
8 lines
171 B
Rust
fn get_count(string: &str) -> usize {
|
|
string.matches(&['a', 'e', 'i', 'o', 'u'][..]).count()
|
|
}
|
|
|
|
#[test]
|
|
fn my_tests() {
|
|
assert_eq!(get_count("abracadabra"), 5);
|
|
}
|