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

# formIndex(after:)

Replaces the given index with its successor.

## Declaration

```swift
func formIndex(after i: inout Self.Index)
```

## Parameters

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

## See Also

### Manipulating Indices

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