On 3/2/2015 2:22 PM, Juanjo Conti wrote:
According the docs (
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/)
NSURL(string: aString) will return nil if aString is malformed.

But I've tried this in the a playground and no nil is returned:

NSURL(string: "")!
NSURL(string: "ssss")!

Why is this? are the docs wrong?

Thanks in advance,
The doc also states the URL format string conforms to RFC2396, which defines the term "relative URI reference". That's what you are providing in this case, a relative URI reference; even a blank relative URI reference is allowed.

Paul

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to