---
title: "indexLessThanIndex(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsindexset/indexlessthanindex(_:)"
---

# indexLessThanIndex(_:)

Returns either the closest index in the index set that is less than a specific index or the not-found indicator.

## Declaration

```swift
func indexLessThanIndex(_ value: Int) -> Int
```

## Parameters

- `value`: Index being inquired about.

## Return Value

Return Value Closest index in the index set less than index; NSNotFound when the index set contains no qualifying index.

## See Also

### Getting Indexes

- [firstIndex](foundation/nsindexset/firstindex.md)
- [lastIndex](foundation/nsindexset/lastindex.md)
- [indexLessThanOrEqual(to:)](foundation/nsindexset/indexlessthanorequal(to:).md)
- [indexGreaterThanOrEqual(to:)](foundation/nsindexset/indexgreaterthanorequal(to:).md)
- [indexGreaterThanIndex(_:)](foundation/nsindexset/indexgreaterthanindex(_:).md)
- [getIndexes(_:maxCount:inIndexRange:)](foundation/nsindexset/getindexes(_:maxcount:inindexrange:).md)
