I have an if statement that compares strings but I want to compare strings that have the same words but different order and have it returned as true.
string 1 a,b,c
string 2 b,c,a
How can I compare them and have the if statement see it as the same string?
Separate the string using componentsSeperatedByString: using whatever string separates your words (comma, space) and put the result in a NSSet. Do it to both strings and compare the sets for equality.
Modified method using mutableArray instead of Set for taking problems with duplicate strings into consideration (as described in comments):