---
title: "contains(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/rangeset/contains(_:)"
---

# contains(_:)

Returns a Boolean value indicating whether the given value is contained by the ranges in the range set.

## Declaration

```swift
func contains(_ value: Bound) -> Bool
```

## Parameters

- `value`: The value to look for in the range set.

## Return Value

Return Value true if value is contained by a range in the range set; otherwise, false.

## Discussion

Discussion note: O(log n), where n is the number of ranges in the range set.
