For example, given a string of Battle of the Vowels:Hawaii vs Gronzy
when we specify the characters to be removed as aeiou
, the function should transfo
One simple way to do this is to use a regular expression:
"Battle of the Vowels:Hawaii vs Gronzy".replaceAll("[aeiou]","")
Some Java Class Library API documentation:
String.replaceAll: http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String)
Patterns and regular expressions: http://download.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.html#sum