---
title: "subscript(_:)"
framework: swift
role: symbol
role_heading: Instance Subscript
path: "swift/unicode/scalar/utf16view/subscript(_:)"
---

# subscript(_:)

Accesses the code unit at the specified position.

## Declaration

```swift
subscript(position: Int) -> UTF16.CodeUnit { get }
```

## Parameters

- `position`: The position of the element to access. position must be a valid index of the collection that is not equal to the endIndex property.
