---
title: "indices(of:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/span/indices(of:)"
---

# indices(of:)

Returns the indices within self where the memory represented by other is located, or nil if other is not located within self.

## Declaration

```swift
func indices(of other: borrowing Span<Element>) -> Range<Span<Element>.Index>?
```

## Return Value

Return Value A range of indices within self, or nil

## Discussion

Discussion other: a span that may be a subrange of self
