---
title: "contains(where:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/optional/publisher-swift.struct/contains(where:)"
---

# contains(where:)

## Declaration

```swift
func contains(where predicate: (Optional<Wrapped>.Publisher.Output) -> Bool) -> Optional<Bool>.Publisher
```
