Skip to content

Instantly share code, notes, and snippets.

@matthewcheok
Last active August 29, 2015 14:24
NSURL with Operators
import Foundation
func +(lhs: NSURL, rhs:String) -> NSURL {
return lhs.URLByAppendingPathComponent(rhs)
}
let url = NSURL(string: "http://google.com")!
url
url + "pages"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment