# `GSShapeGroup groupIndexRange()`

*Instance Method*

The range of layer shape indices that includes all group members and the index of the group shape itself (which is always at the last index of the range).

## Declaration

```swift
func groupIndexRange() -> Range<Int>?
```

## Discussion

Returns `nil` if the group is not part of a layer.

> **Complexity**
> O(*n*) where *n* is the number of shapes in the layer.

## See Also

### Membership

- [`GSShapeGroup containsShape:`](/Core/GlyphsCore/GSShapeGroup/containsShape:) — Returns whether the given shape is a member of the group.
- [`GSShapeGroup depth(of:)`](/Core/GlyphsCore/GSShapeGroup/depth(of:)) — Returns the relative depth of the shape within the group.

