Count how many vowels and consonants occur in a string: Difference between revisions

Content added Content deleted
Line 666: Line 666:
CFArrayRef strings = @[@"abcdefghijklmnop345qrstuvwxyz",
CFArrayRef strings = @[@"abcdefghijklmnop345qrstuvwxyz",
@"The quick brown fox jumps over the lazy dog",
@"The quick brown fox jumps over the lazy dog",
@"The answer my friend is blowing in the wind"]
@"The answer my friend is blowin' in the wind"]
for index = 0 to len(strings) - 1
for index = 0 to len(strings) - 1
Line 681: Line 681:
"abcdefghijklmnop345qrstuvwxyz" contains 5 vowels and 21 consonants
"abcdefghijklmnop345qrstuvwxyz" contains 5 vowels and 21 consonants
"The quick brown fox jumps over the lazy dog" contains 11 vowels and 24 consonants
"The quick brown fox jumps over the lazy dog" contains 11 vowels and 24 consonants
"The answer my friend is blowing in the wind" contains 11 vowels and 24 consonants
"The answer my friend is blowin' in the wind" contains 11 vowels and 23 consonants
</pre>
</pre>