• 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: Want to know if a string only contains letters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Want to know if a string only contains letters


  • Subject: Re: Want to know if a string only contains letters
  • From: Aki Inoue <email@hidden>
  • Date: Fri, 6 Jul 2007 11:55:40 -0700

You can use inverted [NSCharacterSet letterCharacterSet] coupled with [NSString rangeOfCharacterFromSet:].

Aki

On 2007/07/06, at 11:50, Marcus Karlsson wrote:

Hi.

I have a NSString and want to know if it only contains letters. That's easy to do with ASCII, but I don't know about every other letter. Does Cocoa have the ability to tell if the characters in a NSString is letters?

Marcus



_______________________________________________

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

_______________________________________________

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


  • Follow-Ups:
    • Re: Want to know if a string only contains letters
      • From: Marcus Karlsson <email@hidden>
References: 
 >Want to know if a string only contains letters (From: Marcus Karlsson <email@hidden>)

  • Prev by Date: Want to know if a string only contains letters
  • Next by Date: Re: Want to know if a string only contains letters
  • Previous by thread: Want to know if a string only contains letters
  • Next by thread: Re: Want to know if a string only contains letters
  • Index(es):
    • Date
    • Thread