---
title: "byteOffsets(of:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/rawspan/byteoffsets(of:)"
---

# byteOffsets(of:)

Returns the offsets where the memory of other is located within the memory represented by self

## Declaration

```swift
func byteOffsets(of other: borrowing RawSpan) -> Range<Int>?
```

## Parameters

- `other`: A subrange of self

## Return Value

Return Value A range of offsets within self

## Discussion

Discussion Note: other must be a subrange of self
