Comparing Strings With NSString In Objective-C

No frills, just the latest news from hundreds of the best sources.

Comparing Strings With NSString In Objective-C

Jan 24, 2012 2:31 pm
Many people, when they are first starting with Objective-C and iOS want to be able to compare strings in if-then statements and things like that. It seems natural to try to write something like: NSString *string1 = @"A"; NSString *string2 = @"B"; if(string1 == string2) //do something else //or not NOTE: ^ the code above [...]
Health News Zone
Auto News Today
Celebrity Gossip Feed