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

# endIndex

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

## Declaration

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

## See Also

### Accessing Indices

- [startIndex](foundation/attributedstringprotocol/startindex.md)
- [index(_:offsetByCharacters:)](foundation/attributedstringprotocol/index(_:offsetbycharacters:).md)
- [index(_:offsetByRuns:)](foundation/attributedstringprotocol/index(_:offsetbyruns:).md)
- [index(_:offsetByUnicodeScalars:)](foundation/attributedstringprotocol/index(_:offsetbyunicodescalars:).md)
- [index(afterCharacter:)](foundation/attributedstringprotocol/index(aftercharacter:).md)
- [index(afterRun:)](foundation/attributedstringprotocol/index(afterrun:).md)
- [index(afterUnicodeScalar:)](foundation/attributedstringprotocol/index(afterunicodescalar:).md)
- [index(beforeCharacter:)](foundation/attributedstringprotocol/index(beforecharacter:).md)
- [index(beforeRun:)](foundation/attributedstringprotocol/index(beforerun:).md)
- [index(beforeUnicodeScalar:)](foundation/attributedstringprotocol/index(beforeunicodescalar:).md)
- [AttributedString.Index](foundation/attributedstring/index.md)
