Re: int to NSString?
Re: int to NSString?
- Subject: Re: int to NSString?
- From: "I. Savant" <email@hidden>
- Date: Mon, 25 Jun 2007 12:41:19 -0400
On 6/24/07, Devraj Mukherjee <email@hidden> wrote:
Hi everyone,
How do I convert an int to an NSString?
I usually do something like this:
int myInteger = 5;
NSString * s = [NSString stringWithFormat:@"%i", myInteger];
Or, if it's an NSNumber:
NSNumber * myNumber = [NSNumber numberWithInt:5];
NSString * s = [myNumber stringValue];
Also is there an NSInt or a
NSInteger class?
There's NSNumber and NSDecimalNumber ...
--
I.S.
_______________________________________________
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