Character isLetter fix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Character isLetter fix

ReliableRobots.com
213 asCharacter isLetter answers true so this should be used instead.

isLetter
^self asInteger > 64 and: [self asInteger < 123]




Reply | Threaded
Open this post in threaded view
|

Re: Character isLetter fix

Tobias Pape
Hi,

On 16.02.2017, at 20:59, ReliableRobots.com <[hidden email]> wrote:

> 213 asCharacter isLetter answers true so this should be used instead.
>
> isLetter
> ^self asInteger > 64 and: [self asInteger < 123]


Why shouldn't “latin small letter r with inverted breve” be classified as a Letter?

http://www.fileformat.info/info/unicode/char/0213/index.htm

Best regards
        -Tobias

Reply | Threaded
Open this post in threaded view
|

Re: Character isLetter fix

Levente Uzonyi
On Thu, 16 Feb 2017, Tobias Pape wrote:

> Hi,
>
> On 16.02.2017, at 20:59, ReliableRobots.com <[hidden email]> wrote:
>
>> 213 asCharacter isLetter answers true so this should be used instead.
>>
>> isLetter
>> ^self asInteger > 64 and: [self asInteger < 123]
>
>
> Why shouldn't “latin small letter r with inverted breve” be classified as a Letter?
>
> http://www.fileformat.info/info/unicode/char/0213/index.htm
213 is latin capital letter o with tilde.
http://www.fileformat.info/info/unicode/char/00D5/index.htm
But that's still a letter.

Levente

>
> Best regards
> -Tobias

Reply | Threaded
Open this post in threaded view
|

Re: Character isLetter fix

Chris Muller-3
In reply to this post by ReliableRobots.com
You could extend Character in your own app with #isAsciiLetter:

  ^self isAscii and: [ self isLetter ]


On Thu, Feb 16, 2017 at 1:59 PM, ReliableRobots.com
<[hidden email]> wrote:
> 213 asCharacter isLetter answers true so this should be used instead.
>
> isLetter
> ^self asInteger > 64 and: [self asInteger < 123]
>
>
>
>
>