no

XCode How to check if a string contains another string

 NSString *string = @"how to check if a string contains another string"; if ([string rangeOfString:@"how"].locatio...

 NSString *string = @"how to check if a string contains another string";

 if ([string rangeOfString:@"how"].location == NSNotFound) 
 {
     NSLog(@"Not found");
 } 
 else 
 {
     NSLog(@"Found");
 }

Related

iOS 8334065876654637123

Post a Comment

item