NSString *string = @"hello World";
if ([string rangeOfString:@"World"].location == NSNotFound) {
NSLog(@"string does not contain World");
} else {
NSLog(@"string contains World!");
}
NSString *string = @"hello World";
if ([string rangeOfString:@"World"].location == NSNotFound) {
NSLog(@"string does not contain World");
} else {
NSLog(@"string contains World!");
}