Returns a Boolean value that indicates whether every object in the receiving set is also present in another given set.
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
func isSubset(of otherSet: Set<Any Hashable>) -> Bool
Parameters
otherSet
The set with which to compare the receiving set.
Return Value
true
if every object in the receiving set is also present in other
, otherwise false
.
Discussion
Object equality is tested using isEqual:.