Converting Int To String

Sage
Posts: 1,066
Joined: 2004.07
Post: #1
Does anyone know how to quickly convert an integer into a string (preferably an NSString)? Thanks for all the help you guys have given to me over the last 10 months.
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #2
NSString *string = [NSString stringWithFormat:@"%d", yourInteger];
Quote this message in a reply
Sage
Posts: 1,066
Joined: 2004.07
Post: #3
Dang. I was close to that but I got errors when trying. Not sure what I did wrong but I thought that was how it was done. Thanks.
Quote this message in a reply
Member
Posts: 129
Joined: 2005.02
Post: #4
Don't feel bad. I always have to refer to documentation for that, for some reason.
Quote this message in a reply
Member
Posts: 153
Joined: 2004.12
Post: #5
maaaaark Wrote:Don't feel bad. I always have to refer to documentation for that, for some reason.

heh, Thats probably my most used function. I bet I can type "[NSString stringWithFormat:" quicker then any other 25 char string.

That probably means im grossly overusing NSString's Rasp

There was a long silence...
'I claim them all,' said the Savage at last.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  formatting value in a string sefiroths 3 4,241 Dec 12, 2011 02:41 AM
Last Post: sefiroths
  Getting a value from a String Megamac04 5 3,992 Jan 31, 2010 04:23 PM
Last Post: smasher
  Parsing from a string to something faster? Madrayken 3 3,279 Aug 10, 2009 03:32 PM
Last Post: smasher
  Is -fconstant-string-class broken under the XCode/Next runtime Justin Brimm 17 8,028 Jun 12, 2008 01:04 PM
Last Post: Justin Brimm
  string to interger comparison? dareuhl 8 4,582 May 22, 2008 05:44 PM
Last Post: OneSadCookie