---
title: "subscript(_:)"
framework: foundation
role: symbol
role_heading: Instance Subscript
path: "foundation/attributedsubstring/subscript(_:)-96fey"
---

# subscript(_:)

Returns a substring of the attributed substring that a range indicates.

## Declaration

```swift
subscript(bounds: some RangeExpression<AttributedString.Index>) -> AttributedSubstring { get }
```
