extracting(_:)
Constructs a new span over the items within the supplied range of indices within this span.
Declaration
mutating func extracting(_ bounds: Range<MutableSpan<Element>.Index>) -> MutableSpan<Element>Parameters
- bounds:
A valid range of indices. Every index in this range must be within the bounds of this
MutableSpan.
Return Value
A MutableSpan over the items within bounds.
Discussion
The returned span represents a mutation of this span.
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.