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

# subtracting(_:)

Returns a new set containing the contents of this range set that are not also in the given range set.

## Declaration

```swift
func subtracting(_ other: RangeSet<Bound>) -> RangeSet<Bound>
```

## Parameters

- `other`: The range set to subtract.

## Return Value

Return Value A new range set.
