Re: convert int to NSString (Newbie)
Re: convert int to NSString (Newbie)
- Subject: Re: convert int to NSString (Newbie)
- From: The Karl Adam <email@hidden>
- Date: Mon, 21 Feb 2005 17:35:20 -0500
Well that and NSString's -stringWithFormat is actually faster,
probably due to the NSNumber object being created for the alternate
method.
-Karl
On Mon, 21 Feb 2005 16:21:55 -0600, Justin Spahr-Summers
<email@hidden> wrote:
> What's there to localize? Besides, the NSNumber descriptionWithLocale:
> method simply uses %i as a format string with NSString, so there's no
> difference, except that method allocates an unneeded object.
>
> On Mon, 21 Feb 2005 10:38:23 -0500, Sean McBride
> <email@hidden> wrote:
> > On 2005-02-21 12:52, M. Uli Kusterer said:
> >
> > >>>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.
> >
> > I would think that is the better solution, as using %d doesn't (I don't
> > think) give localised results.
> _______________________________________________
> 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