feat(rust): add vowel count kata
This commit is contained in:
parent
0ed78eed50
commit
c6b65c42cf
1 changed files with 8 additions and 0 deletions
8
rust/tests/7_vowel_count.rs
Normal file
8
rust/tests/7_vowel_count.rs
Normal 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);
|
||||
}
|
Loading…
Reference in a new issue