title: IOS/Objective-C: Case Insenstive Search using StringByReplacingOccurenceOfString
body: <p>I am confused about case insensitive search of an NSString.</p>
  
  <p>I gather a regular <code>stringByReplacingOccurrencesOfString</code> is always case sensitive: </p>
  
  <pre><code>[myString stringByReplacingOccurrencesOfString:verb withString:@" "];
  </code></pre>
  
  <p>but there is a variant <code>stringByReplacingOccurencesofString options: range:</code> that has a case insensitive option.</p>
  
  <pre><code>  - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target 
                                          withString:(NSString *)replacement 
                                             options:(NSStringCompareOptions)options 
                                               range:(NSRange)searchRange;
  </code></pre>
  
  <p>I got an error when I tried to specify range: nil.  What does the range refer to and how do I know what range to specify, X Y in the example above if I don't know whether the searchstring will be found?  </p>
  
  <p>Thanks in advance for any insights and suggestions.</p>