---
title: "subscript(_:)"
framework: foundation
role: symbol
role_heading: Instance Subscript
path: "foundation/attributedstringprotocol/subscript(_:)-109me"
---

# subscript(_:)

Returns a substring of the attributed string using a range to indicate the substring bounds.

## Declaration

```swift
subscript<R>(bounds: R) -> AttributedSubstring where R : RangeExpression, R.Bound == AttributedString.Index { get }
```
