Re: int to NSString?
Re: int to NSString?
- Subject: Re: int to NSString?
- From: Andrew Merenbach <email@hidden>
- Date: Mon, 25 Jun 2007 11:18:19 -0700
Hi, Devraj,
You can convert an int to an NSString with the following code:
int myInt = 3;
NSString *myString = [[NSString alloc] initWithFormat:@"%i", myInt];
or, for an autoreleased string,
int myInt = 3;
NSString *myString = [NSString stringWithFormat:@"%i", myInt];
Hope that this helps!
Cheers,
Andrew
On Jun 23, 2007, at 10:49 PM, Devraj Mukherjee wrote:
Hi everyone,
How do I convert an int to an NSString? Also is there an NSInt or a
NSInteger class?
Thanks for your time.
--
"I never look back darling, it distracts from the now", Edna Mode (The
Incredibles)
_______________________________________________
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:
40ucla.edu
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