Re: Putting a single " into an NSString or adding it to an NSMutableString?
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.