CharExtensionsIsVowel Method

This function determines whether a character is considered a vowel.

In the English language, the basic set of vowels consists of the letters 'a', 'e', 'i', 'o' and 'u'. However, there are additional characters and diacritics that represent vowels or modified vowel sounds in various languages and writing systems.

This function takes into account a wide range of such characters, including but not limited to:

• Basic vowels: 'a', 'e', 'i', 'o' and 'u'.

• Latin Accented vowels: 'á', 'é', 'í', 'ó', 'ú', etc.

• Extended Latin characters: 'ā', 'ą', 'ǻ', 'ḁ', 'å', 'ã', etc.

• Greek characters: 'α', 'ἑ', 'ἵ', 'ὅ', 'ῄ', 'ῲ', etc.

• Cyrillic characters: 'ы', 'я', 'ю', etc.

• Other characters and ligatures: 'æ', 'œ', 'ʊ', 'ø', 'ʌ', etc.

Definition

Namespace: DevCase.Extensions.CharExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static bool IsVowel(
	this char c,
	bool latinAccentedVowels = true,
	bool otherVowels = true
)

Parameters

c  Char
The character to check.
latinAccentedVowels  Boolean  (Optional)
Optional. If True, includes the basic set of latin accented vowels in the character comparison:

'á', 'é', 'í', 'ó', 'ú', 'à', 'è', 'ì', 'ò', 'ù', 'ä', 'ë', 'ï', 'ö' and 'ü'.

Default value: True.

otherVowels  Boolean  (Optional)
Optional. If True, includes the additional range of vowels in the character comparison.

Default value: True.

Note: This does not include the basic set of latin accented vowels. To include them, set latinAccentedVowels parameter to True.

Return Value

Boolean
True if the character is a vowel; otherwise, False.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Char. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The determination of what constitutes a vowel can vary depending on the language or linguistic context.

This function aims to cover a broad range of characters commonly regarded as vowels in various languages and writing systems. However, it may not account for all possible cases and specific linguistic requirements.

Therefore, it is recommended to use this function as a general-purpose tool and adjust it according to specific needs if necessary.

See Also