---
title: endIndex
framework: swift
role: symbol
role_heading: Instance Property
path: swift/string/endindex
---

# endIndex

A string’s “past the end” position—that is, the position one greater than the last valid subscript argument.

## Declaration

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

## Discussion

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

## See Also

### Manipulating Indices

- [startIndex](swift/string/startindex.md)
- [index(after:)](swift/string/index(after:).md)
- [formIndex(after:)](swift/string/formindex(after:).md)
- [index(before:)](swift/string/index(before:).md)
- [formIndex(before:)](swift/string/formindex(before:).md)
- [index(_:offsetBy:)](swift/string/index(_:offsetby:).md)
- [index(_:offsetBy:limitedBy:)](swift/string/index(_:offsetby:limitedby:).md)
- [formIndex(_:offsetBy:)](swift/string/formindex(_:offsetby:).md)
- [formIndex(_:offsetBy:limitedBy:)](swift/string/formindex(_:offsetby:limitedby:).md)
- [distance(from:to:)](swift/string/distance(from:to:).md)
- [indices](swift/string/indices-swift.property.md)
