Please tell me how to compare 2 string variables
I’m not talking about a string variable and a string (that is already posted on this site)
I have tried this:
if (s isEqualToString: str) {
// ...
}
Here s and ss are two NSMutableStrings that already having values, but this isn’t working. I have also tried isEqual but failed again.
Please help
You’re missing brackets.
You can’t just use
==, because a string with the same content may be stored in different objects.