Re: display int in cocoa
Re: display int in cocoa
- Subject: Re: display int in cocoa
- From: "I. Savant" <email@hidden>
- Date: Wed, 10 Oct 2007 14:19:51 -0400
> ... so is there a way to
> cast an int to NSString?
Two ways off the top of my head:
int x = 0;
NSString * numberString = [[NSNumber numberWithInt:x] stringValue];
-or-
int x = 0;
NSString * numberString = [NSString stringWithFormat:@"%i", x];
--
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