Skip navigation.
 
mlRe: NSString ASCII filter
FROM : Sean McBride
DATE : Tue Feb 12 21:04:05 2008

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

--
____________________________________________________________
Sean McBride, B. Eng                <email_removed>
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

Related mailsAuthorDate
mlNSString ASCII filter James Hober Feb 12, 20:58
mlRe: NSString ASCII filter Aki Inoue Feb 12, 21:01
mlRe: NSString ASCII filter Sean McBride Feb 12, 21:04
mlRe: NSString ASCII filter James Hober Feb 12, 22:29