title: Convert String to NSURL is return nil in swift
body: <p>I am trying to convert a <code>String</code> to <code>NSURL</code> and my code for that is Below:</p>
  
  <pre><code>var url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=\(self.latitude),\(self.longitude)&amp;destinations=\(self.stringForDistance)&amp;language=en-US"
      println("This is String: \(url)")
      var remoteUrl : NSURL? = NSURL(string: url)
      println("This is URL: \(remoteUrl)")
  </code></pre>
  
  <p>And console prints something like this:</p>
  
  <pre><code>This is String: https://maps.googleapis.com/maps/api/distancematrix/json?origins=-34.4232722,150.8865837&amp;destinations=-34.4250728,150.89314939999997|-34.4356434,150.8858692|-34.4250728,150.89314939999997|-34.4356434,150.8858692|-34.4250728,150.89314939999997|-34.4356434,150.8858692|-34.423234,150.88658899999996|-34.423234,150.88658899999996|-34.428251,150.899673|-34.4257439,150.89870229999997|-34.423234,150.88658899999996|-34.4257439,150.89870229999997|-34.425376,150.89388299999996&amp;language=en-US
  
  This is URL: nil
  </code></pre>
  
  <p>The <code>remoteUrl</code> is <code>nil</code> and I don't know what is the problem here.</p>
  
  <p>After that I try sort <code>String</code> like this:</p>
  
  <pre><code>var url : String = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=-34.4232722,150.8865837&amp;destinations=-34.4250728,150.89314939999997&amp;language=en-US"
      println("This is String: \(url)")
      var remoteUrl : NSURL? = NSURL(string: url)
      println("This is URL: \(remoteUrl)")
  </code></pre>
  
  <p>And console prints:</p>
  
  <pre><code>This is String: https://maps.googleapis.com/maps/api/distancematrix/json?origins=-34.4232722,150.8865837&amp;destinations=-34.4250728,150.89314939999997&amp;language=en-US
  This is URL: Optional(https://maps.googleapis.com/maps/api/distancematrix/json?origins=-34.4232722,150.8865837&amp;destinations=-34.4250728,150.89314939999997&amp;language=en-US)
  </code></pre>
  
  <p>This is working fine.</p>
  
  <p>So can anybody please tell me what is wrong with my first case?</p>