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

# removeSubrange(_:)

Removes a range of characters from the attributed string.

## Declaration

```swift
mutating func removeSubrange(_ range: some RangeExpression<AttributedString.Index>)
```

## Parameters

- `range`: The range to remove.

## See Also

### Modifying an Attributed String

- [insert(_:at:)](foundation/attributedstring/insert(_:at:).md)
- [AttributedString.Index](foundation/attributedstring/index.md)
- [replaceSubrange(_:with:)](foundation/attributedstring/replacesubrange(_:with:).md)
