FROM : James Hober
DATE : Tue Feb 12 22:29:10 2008
On Feb 12, 2008, at 12:04 PM, Sean McBride wrote:
> On 2/12/08 11:58 AM, James Hober said:
>
>
>> What is the simplest, reasonably efficient way to determine if an
>> NSString contains a non-ASCII character
>>
>
> How about:
>
> BOOL foo = [string canBeConvertedToEncoding:
> NSASCIIStringEncoding];
>
Yes! A one liner for simple task. Thanks!
James
DATE : Tue Feb 12 22:29:10 2008
On Feb 12, 2008, at 12:04 PM, Sean McBride wrote:
> On 2/12/08 11:58 AM, James Hober said:
>
>
>> What is the simplest, reasonably efficient way to determine if an
>> NSString contains a non-ASCII character
>>
>
> How about:
>
> BOOL foo = [string canBeConvertedToEncoding:
> NSASCIIStringEncoding];
>
Yes! A one liner for simple task. Thanks!
James
| Related mails | Author | Date |
|---|---|---|
| James Hober | Feb 12, 20:58 | |
| Aki Inoue | Feb 12, 21:01 | |
| Sean McBride | Feb 12, 21:04 | |
| James Hober | Feb 12, 22:29 |






Cocoa mail archive

