View Single Post
 
Reply
Posted 2010-03-01, 11:27 AM in reply to Slyvr's post starting "Thank youu. The .charAt worked but I..."
If you want to see if all the characters in a string are lowercase, for String str, then you can do the following

Code:
if(str.compareTo(str.toLowerCase())!=0)
{
     //  do this if the string is not lower case
}
else
{
     // do this if string is lower case
}
No loops necessary.
Old
Profile PM WWW Search
Demosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to be
 
Demosthenes