---
title: "extracting(unchecked:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/span/extracting(unchecked:)-8hfj1"
---

# extracting(unchecked:)

Constructs a new span over the items within the supplied range of positions within this span.

## Declaration

```swift
func extracting(unchecked bounds: Range<Span<Element>.Index>) -> Span<Element>
```

## Parameters

- `bounds`: A valid range of positions. Every position in this range must be within the bounds of this Span.

## Return Value

Return Value A Span over the items within bounds

## Discussion

Discussion The returned span’s first item is always at offset 0; unlike buffer slices, extracted spans do not share their indices with the span from which they are extracted. This function does not validate bounds; this is an unsafe operation. note: O(1)
