• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString and char *
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSString and char *
      • From: Finlay Dobbie <email@hidden>
    • RE: NSString and char *
      • From: "Lars Elden" <email@hidden>
References: 
 >NSString and char * (From: "Lars Elden" <email@hidden>)
 >RE: NSString and char * (From: "Lars Elden" <email@hidden>)

  • Prev by Date: NSPanel Information
  • Next by Date: Re: Affine Transform
  • Previous by thread: RE: NSString and char *
  • Next by thread: RE: NSString and char *
  • Index(es):
    • Date
    • Thread