---
title: "removeSubranges(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/attributedstring/removesubranges(_:)"
---

# removeSubranges(_:)

Removes the elements at the given indices.

## Declaration

```swift
mutating func removeSubranges(_ subranges: RangeSet<AttributedString.Index>)
```

## Parameters

- `subranges`: The indices of the elements to remove.
