On 4/22/13 3:47 AM, "Harbs" <harbs.li...@gmail.com> wrote:

> 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Š)
My first thought was: 'what about Asia?'

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

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui

Reply via email to