Re: convert int to NSString (Newbie)
Re: convert int to NSString (Newbie)
- Subject: Re: convert int to NSString (Newbie)
- From: Evan Schoenberg <email@hidden>
- Date: Mon, 21 Feb 2005 08:21:56 -0600
Can't resist...
How about:
char buf[MAX_INT];
itoa (theInt, buf, 10);
[NSString stringWithUTF8String:buf];
-Evan
On Feb 21, 2005, at 5:52 AM, M. Uli Kusterer wrote:
At 9:50 Uhr +0100 21.02.2005, Geert B. Clemmensen wrote:
On 21. feb 2005, at 8.01, Daniel Child wrote:
Is there a simple way to convert an int into an NSString?
Many ways and [NSString stringWithFormat:@"%d", intValue] is one of
them.
[[NSNumber numberWithInt: theInt] stringValue] is another one.
This is fun! :-)
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden