Re: NSString - Initialize with number....
Re: NSString - Initialize with number....
- Subject: Re: NSString - Initialize with number....
- From: "John C. Randolph" <email@hidden>
- Date: Tue, 2 Oct 2001 10:40:45 -0700
On Tuesday, October 2, 2001, at 04:31 AM, Ryan Dary wrote:
How do I create a new NSString with a textual representation of a number
from an int?
int foo;
NSString *fooAsText = [[NSNumber numberWithInt:foo] stringValue];
This should be slightly cheaper than +stringWithFormat:, since there's
no format to parse.
-jcr
"I fear all we have done is to awaken a sleeping giant and fill him with
a terrible resolve." -Admiral Isoroku Yamamoto, Dec 7, 1941.