Skip to content · ⁨Passer au contenu⁩

Count the vowels · ⁨Compter les voyelles⁩

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.

Français

Compter les voyelles

Comptez les voyelles (a e i o u) dans un String, en traitant majuscules et minuscules de la même manière. Mettez-le en minuscule d'abord avec s.toLowerCase(), puis bouclez avec s.charAt(i) et comparez contre chaque voyelle.

Log in or create account · ⁨Se connecter ou créer un compte⁩

IGCSE, A-Level & AP