---
title: "extracting(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/span/extracting(_:)-57peb"
---

# extracting(_:)

Constructs a new span over all the items of this span.

## Declaration

```swift
func extracting(_: UnboundedRange) -> Span<Element>
```

## Return Value

Return Value A Span over all the items of this span.

## 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. note: O(1)
