Originally posted by Timmy Marks:
Of course, this fails when using non-ascii character sets.
True.
There is a way that uses the same concept. Given that most character sets have the upper case letters consecutively, you can just ask
Well, of course we know that
Java always uses unicode, which has a lot more uppercase characters then just A-Z. So in Java, your solution fails, too.
Anyway, why reinvent the wheel if Sun already did all the work for you?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus