Lets say I have a string "Test Super"
How would I detect "Super" and have the function return a YES?
A quick google finds this: http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/
NSRange textRange; textRange =[string rangeOfString:substring];
if(textRange.location != NSNotFound)
{
//Does contain the substring
}
Use rangeOfString: and check if the result's location is equal to NSNotFound.
[@"Test Super" rangeOfString:@"Super"].location != NSNotFound //YES
[@"Test Super" rangeOfString:@"Supper"].location != NSNotFound //NO