title: Remove http:// from NSString
body: <p>How do I remove certain text from a <code>NSString</code> such as "http://"? It needs to be exactly in that order. Thanks for your help!</p>
  
  <p>Here is the code I am using, however the http:// is not removed. Instead it appears <a href="http://http://www.example.com">http://http://www.example.com</a>. What should I do? Thanks!</p>
  
  <pre><code>NSString *urlAddress = addressBar.text;
  [urlAddress stringByReplacingOccurrencesOfString:@"http://" withString:@""];
  urlAddress = [NSString stringWithFormat:@"http://%@", addressBar.text];
  NSLog(@"The user requested this host name: %@", urlAddress);
  </code></pre>