What about this: if(letter.toLowerCase() != letter.toUpperCase()){ // do your stuff... }
I have no idea how performance compares to figuring it out yourself though… On Apr 22, 2013, at 4:05 AM, Justin Mclean wrote: > Hi, > > Anyone know how to work out if a character, including unicode characters, is > a letter or not? > > This is not the right way of doing it: > > if ("a" <= letter && letter <= "z" || > "A" <= letter && letter <= "Z") > > From the DateFormatter class for the curious. > > Thanks, > Justin > > >