• 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 to ascii code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString to ascii code


  • Subject: Re: NSString to ascii code
  • From: Rustam Muginov <email@hidden>
  • Date: Mon, 17 Jan 2005 11:19:48 +0300

On 1/17/05 11:13 AM, "Peter Karlsson" <email@hidden> wrote:

> Dear list!
>
> I have a NSString like this:
>
> NSString *myString = @"A";
>
> I want to get the ascii code 65 from myString, how do I do that in Cocoa?
>

const char *ptr = [myString cString];

Be warned this could raise NSCharacterConversionException exception if your
string contains any characters which could not be handled as pure 7-bit
ASCII


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSString to ascii code (From: "Peter Karlsson" <email@hidden>)

  • Prev by Date: NSString to ascii code
  • Next by Date: Re: NSString to ascii code
  • Previous by thread: NSString to ascii code
  • Next by thread: Re: NSString to ascii code
  • Index(es):
    • Date
    • Thread