---
title: "subscript(_:)"
framework: Swift
role: symbol
role_heading: Instance Subscript
platforms: [iOS 12.2+, iPadOS 12.2+, Mac Catalyst 12.2+, macOS 10.14.4+, tvOS 12.2+, visionOS 1.0+, watchOS 5.2+]
path: "swift/outputrawspan/subscript(_:)"
---

# subscript(_:)

Accesses the byte at the specified offset in the span.

## Declaration

```swift
subscript(byteOffset: Int) -> UInt8 { get set }
```

## Parameters

- `byteOffset`: The offset of the byte to access. byteOffset must be greater than or equal to zero, and less than byteCount.
