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

# index(after:)

Returns the position immediately after the given index.

## Declaration

```swift
func index(after i: Int) -> Int
```

## Parameters

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

## Return Value

Return Value The index immediately after i.

## See Also

### Manipulating Indices

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