Cocoa Objective-C iPhone NSString comparison question?

jehovaswalrus

New member
In Objective-C, it is possible to compare two NSString objects by stating:

if ([string1 isEqualToString: string2])
{
//Code
}

How do I compare whether or not string1 is NOT equivalent to string2?
I tried:
if (string1 != string2)
This doesn't work.
 
Back
Top