954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Converting lowercase to capitals

I guess I'm going to use ascii values here, taking a string and converting all letters to lowercase. I'd rather use a for loop than a huge switch statement. How do I do this?

blastocyst
Newbie Poster
1 post since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

String s = "lowercase";
String s2 = s.toUpperCase();

Remembers Strings are immutable so this won't work:
String s = "lowercase";
s.toUpperCase();

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You