title: How to bridge Swift String to Objective C NSString?
body: <p>Am I taking crazy pills? Directly out of the documentation: </p>
  
  <blockquote>
    <p>“Swift automatically bridges between the String type and the NSString class. This means that anywhere you use an NSString object, you can use a Swift String type instead and gain the benefits of both types—the String type’s interpolation and Swift-designed APIs and the NSString class’s broad functionality. For this reason, you should almost never need to use the NSString class directly in your own code. In fact, when Swift imports Objective-C APIs, it replaces all of the NSString types with String types. When your Objective-C code uses a Swift class, the importer replaces all of the String types with NSString in imported API.</p>
  </blockquote>
  
  <p>To enable string bridging, just import Foundation.”</p>
  
  <p><strong>I've done this... consider:</strong></p>
  
  <pre><code>import Foundation
  
  var str = "Hello World"
  
  var range = str.rangeOfString("e")
  
  // returns error: String does not contain member named: rangeOfString()
  </code></pre>
  
  <p><strong>However:</strong></p>
  
  <pre><code>var str = "Hello World" as NSString
  
  var range = str.rangeOfString("e")
  
  // returns correct (2, 1)
  </code></pre>
  
  <p>Am I missing something? </p>