You have to analyze the input one character at a time...
[INDENT]Say we have a string: myString
Set up a for loop with a lower limit of 0 and an upper limit of myString.length()-1 inclusive
Read each character one at a time with myString.charAt(int index)
Analyze the single character. What is it? A vowel? Upper-case? Lower-case?
Append the new character to another string / a buffer.
Next character in the loop...[/INDENT]
There are other ways to do this, but the above should work for general purpose.
Cudmore
Junior Poster in Training
74 posts since Nov 2005
Reputation Points: 20
Solved Threads: 6
Easiest (and fastest) is to use regular expressions to replace all uppercase letters with an asterisk, then call toUppercase() on the resulting string.
Far more elegant (and possibly faster, especially with long strings) than looping through every character.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337