Skip to content

Count the vowels · ⁨数元音字母⁩

English

Count the vowels

Count the vowels (a e i o u) in a String, treating upper- and lower-case the same. Lower-case it first with s.toLowerCase(), then loop with s.charAt(i) and compare against each vowel.

中文

数元音字母

数一数 String 中的元音字母(a e i o u),大小写视为相同。先用 s.toLowerCase() 转成小写,再用 s.charAt(i) 遍历,并与每个元音比较。

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩