Contents

hash

An unsigned integer that can be used as a hash table address.

Declaration

var hash: Int { get }

Discussion

If two string objects are equal (as determined by the isEqual(to:) method), they must have the same hash value. This property fulfills this requirement.

You should not rely on this property having the same hash value across releases of macOS.

See Also

Identifying and Comparing Strings