Re: NSString and char *
Re: NSString and char *
- Subject: Re: NSString and char *
- From: Jordan Krushen <email@hidden>
- Date: Sat, 11 Feb 2006 18:31:18 -0800
On 2/11/06, Lars Elden <email@hidden> wrote:
> NSString * msg = [ [ [ NSString alloc ] initWithCString:"Test" ] autorelease
> ];
>
> working, thanks.
It's also notably absent from the answers given to you in an earlier
reply, most likely because it's deprecated in Tiger. If you're not
using the advice given to you on the list in response to your
questions, why ask them at all? Ideally, reading the docs should
happen before posting, which would help avoid cluttering the list with
questions that are simply answered by pointing you to the relevant
documentation.
Giving you the benefit of the doubt that you're not using Tiger
(although this would still be in the NSString documentation), if you
want an autoreleased string, just use +stringWithCString:
NSString *msg = [NSString stringWithCString:"Test"];
J.
_______________________________________________
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