I have a large number of strings that I'm searching to see if a given substring exists. It seems there are two reasonable ways to do this.

Option 1: Use the `NSString` method `rangeOfSubstring` and test whether `.location` exists:

```
NSRange range = [string rangeOfSubstring:substring];
return (range.location != NSNotFound);

```

Option 2. Use the `NSPredicate` syntax `CONTAINS`:

```
NSPredicate *regex = [NSPredicate predicateWithFormat:@"SELF CONTAINS %@", substring];
return ([regex evaluateWithObject:string] == YES)

```

Which method is better, or is there a good Option 3 that I'm completely missing? No, I'm not sure exactly what I mean by "better", but possibly I mean faster when iterated over many, many `string`s.