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

# subtract(_:)

Removes the contents of the given range set from this range set.

## Declaration

```swift
mutating func subtract(_ other: RangeSet<Bound>)
```

## Parameters

- `other`: A range set to subtract from this one.
