iDevGames Forums
Converting Int To String - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Converting Int To String (/thread-5482.html)



Converting Int To String - Nick - May 31, 2005 08:41 PM

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.


Converting Int To String - Josh - May 31, 2005 09:00 PM

NSString *string = [NSString stringWithFormat:@"%d", yourInteger];


Converting Int To String - Nick - May 31, 2005 09:01 PM

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.


Converting Int To String - maaaaark - Jun 1, 2005 08:29 AM

Don't feel bad. I always have to refer to documentation for that, for some reason.


Converting Int To String - hangt5 - Jun 2, 2005 02:13 AM

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