---
title: "removeSubrange(_:)"
framework: Swift
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+, watchOS 27.0+]
path: "swift/uniquearray/removesubrange(_:)-6hkdt"
---

# removeSubrange(_:)

Removes the specified subrange of elements from the array.

## Declaration

```swift
mutating func removeSubrange(_ bounds: some RangeExpression<Int>)
```

## Parameters

- `bounds`: The subrange of the array to remove. The bounds of the range must be valid indices of the array.

## Discussion

Discussion note: O(self.count)
