if (myChar == '"')
if ([myChar compare:@"\""])
if ([myChar isEqual:@"\""])
if (myChar == @"\"")
None of the comparisons above seem to work. I need to check if myChar, which is taken from an NSString, is a qu开发者_如何学Cotation mark.
Any ideas?
The first one works, actually, if myChar is actually a char. The question is a bit unclear: are you trying to compare to a quote ('"') or a question mark ('?') ?
But yea, the first one works.
精彩评论