---
title: String.IndexDistance
framework: swift
role: symbol
role_heading: Type Alias
path: swift/string/indexdistance
---

# String.IndexDistance

A type that represents the number of steps between two String.Index values, where one value is reachable from the other.

## Declaration

```swift
typealias IndexDistance = Int
```

## Discussion

Discussion In Swift, reachability refers to the ability to produce one value from the other through zero or more applications of index(after:).
