Returns a Boolean value that indicates whether a given object is present in the ordered set.
SDKs
- iOS 5.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
func contains(_ object: Any) -> Bool
Parameters
object
The object for which to test membership of the ordered set.
Return Value
YES if object
is present in the set, otherwise false
.