• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString - Initialize with number....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: NSString - Initialize with number....
      • From: "Erik M. Buck" <email@hidden>
References: 
 >NSString - Initialize with number.... (From: Ryan Dary <email@hidden>)

  • Prev by Date: Re: 10.1 dev tools are now online
  • Next by Date: Re: Making TIFFs with transparency
  • Previous by thread: Re: NSString - Initialize with number....
  • Next by thread: Re: NSString - Initialize with number....
  • Index(es):
    • Date
    • Thread