A quick test on this seems to work with all characters in the latin range with 
the exception of ß (probably because there's no official capital and lowercase…)

On Apr 22, 2013, at 1:41 PM, Harbs wrote:

> 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
>> 
>> 
>> 
> 

Reply via email to