• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString ASCII filter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString ASCII filter


  • Subject: Re: NSString ASCII filter
  • From: James Hober <email@hidden>
  • Date: Tue, 12 Feb 2008 13:29:10 -0800

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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Repetitive Appending of Strings
  • Next by Date: Re: My FetchRequest is not aware of changes I made
  • Previous by thread: Re: NSString ASCII filter
  • Next by thread: KVC and KVO for arrays
  • Index(es):
    • Date
    • Thread