---
title: "index(after:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/string/index(after:)"
---

# index(after:)

Returns the position immediately after the given index.

## Declaration

```swift
func index(after i: String.Index) -> String.Index
```

## Parameters

- `i`: A valid index of the collection. i must be less than endIndex.

## Return Value

Return Value The index value immediately after i.

## See Also

### Manipulating Indices

- [startIndex](swift/string/startindex.md)
- [endIndex](swift/string/endindex.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)
