Commit 427eb703 authored by Johannes Schriewer's avatar Johannes Schriewer

URL conforms to Hashable and Equatable now

parent 5de7f4b3
Pipeline #1742 passed with stage
......@@ -239,6 +239,16 @@ extension URL: CustomStringConvertible {
}
}
extension URL: Hashable {
public var hashValue: Int {
return self.description.hashValue
}
}
public func ==(lhs: URL, rhs: URL) -> Bool {
return lhs.description == rhs.description
}
public extension String {
public var urlEncoded: String {
let dict = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F" ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment