---
title: "index(before:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/indexset/rangeview-swift.struct/index(before:)"
---

# index(before:)

Returns the index in the range before the specified one.

## Declaration

```swift
func index(before i: IndexSet.RangeView.Index) -> IndexSet.RangeView.Index
```

## See Also

### Finding Indexes

- [startIndex](foundation/indexset/rangeview-swift.struct/startindex.md)
- [endIndex](foundation/indexset/rangeview-swift.struct/endindex.md)
- [index(after:)](foundation/indexset/rangeview-swift.struct/index(after:).md)
