Is it possible to include a quotation mark as part of an nsstring?
Sure, you just need to escape the quotation mark.
NSString *someString = @"This is a quotation mark: \"";
NSLog(@"%@", someString );
Output:
This is a quotation mark: "
You can use Double Quote Escape Sequence here. You need to escape it using a backslash :
NSString *str = @"Hello \"World\"";
NSLog(@"Output : %@",str);
Output : Hello "World"
There are some other Escape Sequences also. Take a look at it :
\b Backspace
\f Form Feed
\n Newline
\t Horizontal Tab
\v Vertical Tab
\\ Backslash
\’ Single Quote
\” Double Quote
\? Question Mark