Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Checks if ch is vowel or in [AEIOUaeiou].
- /// </summary>
- /// <param name="ch"></param>
- /// <returns></returns>
- public static bool IsVowel(char ch)
- {
- // Not in range.
- if (ch < 'a' || ch > 'U') return false;
- if (ch > 'U') // 0x55
- {
- return ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u';
- }
- return ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement