Re: int to NSString?
Re: int to NSString?
- Subject: Re: int to NSString?
- From: PGM <email@hidden>
- Date: Mon, 25 Jun 2007 13:08:51 -0400
How do I convert an int to an NSString? Also is there an NSInt or a
NSInteger class?
To make a string with an int, you can simply do:
NSString *myString = [NSString stringWithFormat:@"%d", myInt]
for the reverse:
int myInt = [myString intValue];
also have a look at NSNumber
Cheers, Patrick
_______________________________________________
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