Skip to content

Instantly share code, notes, and snippets.

@JadenGeller
Last active July 21, 2017 03:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JadenGeller/f6e7c525da6902328d791d8d5452936a to your computer and use it in GitHub Desktop.
Save JadenGeller/f6e7c525da6902328d791d8d5452936a to your computer and use it in GitHub Desktop.
Hashable CFString
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