• 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: int to NSString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >int to NSString? (From: "Devraj Mukherjee" <email@hidden>)

  • Prev by Date: Re: int to NSString?
  • Next by Date: Re: WebKit and POST requests (now WSDL and WSMakeStubs)
  • Previous by thread: Re: int to NSString?
  • Next by thread: Re: int to NSString?
  • Index(es):
    • Date
    • Thread