<!--
{
  "availability" : [
    "iOS: 12.2.0 -",
    "iPadOS: 12.2.0 -",
    "macCatalyst: 12.2.0 -",
    "macOS: 10.14.4 -",
    "tvOS: 12.2.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/RawSpan/subscript(unchecked:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s7RawSpanV9uncheckeds5UInt8VSi_tcip"
  },
  "title" : "subscript(unchecked:)"
}
-->

# subscript(unchecked:)

Accesses the byte at the specified offset in the span.

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

## Parameters

`byteOffset`

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

## Overview

This subscript does not validate `byteOffset`. Using this subscript
with an invalid `byteOffset` results in undefined behaviour.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)