---
title: endSubelementIndex
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nswhosespecifier/endsubelementindex
---

# endSubelementIndex

Sets the index position of the last sub-element within the range of objects being tested that pass the specifier’s test.

## Declaration

```swift
var endSubelementIndex: Int { get set }
```

## Parameters

- `index`: The index position of the end sub-element.

## Discussion

Discussion Used only if the end sub-element identifier is NSIndexSubelement.

## See Also

### Accessing information about a whose specifier

- [endSubelementIdentifier](foundation/nswhosespecifier/endsubelementidentifier.md)
- [startSubelementIdentifier](foundation/nswhosespecifier/startsubelementidentifier.md)
- [startSubelementIndex](foundation/nswhosespecifier/startsubelementindex.md)
- [test](foundation/nswhosespecifier/test.md)
