File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes IsUpper for non letters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "IsUpper for non letters" Watch "IsUpper for non letters" New topic

IsUpper for non letters

Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
How does isUpper work for non-letters? I am getting weird stuff
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
isUpper checks to see if it falls into a speciic range in the unicode set of characters. To avoid your strange results you could always test it before you check to see if it upper case. Use isDigit or isLetter to see what it is then test it accordingly.

Sun Certified Programmer for the Java� 2 Platform

I agree. Here's the link:
subject: IsUpper for non letters
It's not a secret anymore!