StringTools - Maple Programming Help

Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Character Class Tests : StringTools/HasVowel

StringTools

 HasVowel
 determine if a string contains any vowels

 Calling Sequence HasVowel(s)

Parameters

 s - string; any Maple string

Description

 • The HasVowel(s) command tests whether any character in its argument s is an English language vowel.
 The vowels are, by definition, the ten characters $"a"$, $"e"$, $"i"$, $"o"$, $"u"$, $"A"$, $"E"$, $"I"$, $"O"$ and $"U"$. No other character is a vowel. In particular, the characters $"y"$ and $"Y"$ are not considered to be vowels for this test.
 • If any character of the string s is a vowel character, then the value true is returned. Otherwise, the value false is returned.

 > $\mathrm{with}\left(\mathrm{StringTools}\right):$
 > $\mathrm{HasVowel}\left("foobar"\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{HasVowel}\left("dfghjkl"\right)$
 ${\mathrm{false}}$ (2)