---
title: endIndex
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/attributedstring/endindex
---

# endIndex

The string’s past-the-end position — the position one greater than the last valid subscript argument.

## Declaration

```swift
var endIndex: AttributedString.Index { get }
```

## Discussion

Discussion In an empty string, endIndex is equal to startIndex.
