• 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: How to transform a NSString to a NSString C string format?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to transform a NSString to a NSString C string format?


  • Subject: Re: How to transform a NSString to a NSString C string format?
  • From: "Sean McBride" <email@hidden>
  • Date: Thu, 5 Feb 2009 18:06:35 -0500
  • Organization: Rogue Research Inc.

On 2/5/09 11:52 PM, Iceberg-Dev said:

>I would like to transform a NSString to a NSString conforming to the
>C string format.
>
>Examples:
>---------
>
>toto -> toto
>
>"toto -> \"toto
>
>toto   -> toto\ntiti
>titi

I think people are misunderstanding your question.  I doubt Cocoa has
any built-in functionality to turn a string into something a C compiler
would accept.  You'll have to code up this logic yourself.  Using a
mutable string seems reasonable.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How to transform a NSString to a NSString C string format? (From: Iceberg-Dev <email@hidden>)

  • Prev by Date: Re: Transparency with PNG on NSImageView
  • Next by Date: Re: Transparency with PNG on NSImageView
  • Previous by thread: Re: How to transform a NSString to a NSString C string format?
  • Next by thread: Re: How to transform a NSString to a NSString C string format?
  • Index(es):
    • Date
    • Thread