jQuery in Action, 3rd edition
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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: http://aspose.com/file-tools
subject: IsUpper for non letters
jQuery in Action, 3rd edition