1、是推断包括字符串 if( [str rangeOfString:@"hello"].location != NSNotFound) { NSLog(@"yes"); } else { NSLog(@"no");