• 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: Andrew Merenbach <email@hidden>
  • Date: Mon, 25 Jun 2007 11:18:19 -0700

Hi, Devraj,

You can convert an int to an NSString with the following code:

	int myInt = 3;
	NSString *myString = [[NSString alloc] initWithFormat:@"%i", myInt];

or, for an autoreleased string,

	int myInt = 3;
	NSString *myString = [NSString stringWithFormat:@"%i", myInt];

Hope that this helps!

Cheers,
	Andrew

On Jun 23, 2007, at 10:49 PM, Devraj Mukherjee wrote:

Hi everyone,

How do I convert an int to an NSString? Also is there an NSInt or a
NSInteger class?

Thanks for your time.

-- "I never look back darling, it distracts from the now", Edna Mode (The
Incredibles)
_______________________________________________


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:
40ucla.edu


This email sent to email@hidden

_______________________________________________

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: HTTP Uploading
  • Next by Date: Re: [SOLVED] NSScrollView: General Question When does scrollRectToVisible does not scroll?
  • Previous by thread: Re: int to NSString?
  • Next by thread: Re: int to NSString?
  • Index(es):
    • Date
    • Thread