IPhone - comparing character returned by characterAtIndex with another hard-coded

I would like to compare the character returned by characterAtIndex with some “hard” characters like @ "or @" P. "This may look silly, but I can't find a way to do this ...

+3
source share
1 answer

Use single quotes:

if ([@"test" characterAtIndex:1] == 'e')
+10
source

All Articles