Talk:Count how many vowels and consonants occur in a string

From Rosetta Code
Revision as of 14:03, 26 July 2021 by PureFox (talk | contribs) (Commented on Ring results.)

Trivial task, but apparently not trivial enough

I was going to recommend this task for deletion as it is incredibly trivial and the operation (identifying whether a character is a vowel or consonant) is covered in a multitude of other tasks. Maybe I am too hasty though, as the task author can't even figure out how to do it correctly. His entry, (the Ring entry) works for the string he used, but will also count [, ], \, _, and ` as consonants. And I don't even program in, or know Ring. Maybe I am guilty of assuming competence that just isn't there. Sigh. --Thundergnat (talk) 13:33, 26 July 2021 (UTC)

Although his code is certainly wrong, I can't understand why it hasn't given the correct answer for the string he's testing (19 consonants). The only characters it contains which aren't vowels and consonants are space and double-quote and, whilst there are 5 of these, they both have ASCII codes below 65 and so should be excluded from the consonant count. Very strange. --PureFox (talk) 14:03, 26 July 2021 (UTC)