Last active
July 21, 2017 03:11
-
-
Save JadenGeller/f6e7c525da6902328d791d8d5452936a to your computer and use it in GitHub Desktop.
Hashable CFString
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CoreFoundation | |
import Foundation | |
extension CFString: Hashable { | |
public var hashValue: Int { | |
return Int(bitPattern: CFHash(self)) | |
} | |
} | |
public func ==(_ lhs: CFString, _ rhs: CFString) -> Bool { | |
return CFEqual(lhs, rhs) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment