• 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: Putting a single " into an NSString or adding it to an NSMutableString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Putting a single " into an NSString or adding it to an NSMutableString?


  • Subject: Re: Putting a single " into an NSString or adding it to an NSMutableString?
  • From: Chris Garaffa <email@hidden>
  • Date: Fri, 25 Apr 2003 11:22:10 -0400

On Friday, April 25, 2003, at 11:02 AM, Mark Ogilvie wrote:
I thought it would be easy to do, just put the single quote between two
other quotes, but it won't work.
So when I try to do this
[string appendString:@" " "]; I get an error, and when I try this
[string appendString:@"" " ""]; I still get an error, is there a way to
do this?

try [string appendByString:@"\""];
If Cocoa is anything like C, C++, PHP, Perl and many other languages with regard to this, all you need to do is escape the " with a \, so you have \"
Otherwise, the compiler wouldn't know if you were ending the string.


--
Chris Garaffa
email@hidden
"President Bush said this Iraq situation looks like 'the rerun of a bad movie.' Well sure, there's a Bush in the White House, the economy's going to hell, we're going to war over oil. I've seen this movie, haven't I?" - Jay Leno
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Putting a single " into an NSString or adding it to an NSMutableString?
      • From: Chris Garaffa <email@hidden>
References: 
 >Putting a single " into an NSString or adding it to an NSMutableString? (From: Mark Ogilvie <email@hidden>)

  • Prev by Date: Putting a single " into an NSString or adding it to an NSMutableString?
  • Next by Date: Re: Putting a single " into an NSString or adding it to an NSMutableString?
  • Previous by thread: Putting a single " into an NSString or adding it to an NSMutableString?
  • Next by thread: Re: Putting a single " into an NSString or adding it to an NSMutableString?
  • Index(es):
    • Date
    • Thread