Create a gist now

Instantly share code, notes, and snippets.

struct URL {
var scheme: String?
var user: String?
var password: String?
var host: String?
var port: Int?
var path: String?
var query: String?
var fragment: String?
var percentEncodedUser: String? {
get { ... }
set { ... }
}
// ...
init(scheme: String? = nil, user: String? = nil, password: String? = nil, host: String? = nil, port: Int? = nil, path: String? = nil, query: String? = nil, fragment: String? = nil) {
self.scheme = scheme
self.user = user
self.password = password
self.host = host
self.port = port
self.path = path
self.query = query
self.fragment = fragment
}
init?(string: String) {
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment