• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Instantiate NSString from NSURL in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Instantiate NSString from NSURL in Swift


  • Subject: Re: Instantiate NSString from NSURL in Swift
  • From: Marco S Hyman <email@hidden>
  • Date: Mon, 23 Feb 2015 11:06:07 -0800

> First, try it on Swift 1.2, which is currently available as part of the
> Xcode 6.3 beta: <https://developer.apple.com/xcode/downloads/>

I'll save him the trouble (because I was curious).  In a 1.2 playground...

let theUrl = NSURL(string: "file://Some.Host/something.txt")
let foo = theUrl?.host?.lowercaseString
let bar = NSString(string: foo!)
let baz = NSString(string: theUrl?.host?.lowercaseString!)

You'd think baz would be the same as bar.  Instead it generates the error
he is seeing.

> If you are able to reproduce this bad diagnostic on Swift 1.2/Xcode 6.3,
> file a bug at <http://bugreport.apple.com>.

Yup, he should do that.

Marc
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Instantiate NSString from NSURL in Swift
      • From: Quincey Morris <email@hidden>
References: 
 >Instantiate NSString from NSURL in Swift (From: Juanjo Conti <email@hidden>)
 >Re: Instantiate NSString from NSURL in Swift (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: get class of a method
  • Next by Date: Re: Instantiate NSString from NSURL in Swift
  • Previous by thread: Re: Instantiate NSString from NSURL in Swift
  • Next by thread: Re: Instantiate NSString from NSURL in Swift
  • Index(es):
    • Date
    • Thread