Re: Converting ASCII Code to a Character
Re: Converting ASCII Code to a Character
- Subject: Re: Converting ASCII Code to a Character
- From: Stéphane Sudre <email@hidden>
- Date: Thu, 31 Jul 2003 09:20:29 +0200
On jeudi, juillet 31, 2003, at 08:03 AM, Andrew Kazmierski wrote:
Hey there,
I have a NSString with an ASCII code like @"65" which is the index of
"A" in the ASCII character table. How can I convert any ASCII code,
such as that one, to a character contained in a NSString?
With a byte of imagination.
unsigned char myByte;
myString=@"65";
myByte=[myString intValue];
myNewString=[NSString stringWithFormat:@"%c", myByte];
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.