Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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