---
title: "index(afterRun:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/attributedstringprotocol/index(afterrun:)"
---

# index(afterRun:)

Returns the position of the run immediately after a run indicated by an index.

## Declaration

```swift
func index(afterRun i: AttributedString.Index) -> AttributedString.Index
```

## Parameters

- `i`: The index of a run in the attributed string.

## Return Value

Return Value The position of first run immediately after the end of i-th run.

## See Also

### Accessing Indices

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