[#absl-Span-subspan] = xref:absl.adoc[absl]::xref:absl/Span.adoc[Span]::subspan :relfileprefix: ../../ :mrdocs: Returns a subspan starting at `pos` and spanning `len` elements. == Synopsis Declared in `<absl/types/span.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr xref:absl/Span.adoc[Span] subspan( xref:absl/Span/size_type.adoc[size_type] pos = 0, xref:absl/Span/size_type.adoc[size_type] len = npos) const; ---- == Description `pos` must be `<= size()`. Any `len` past the end is trimmed to `size() ‐ pos`. The default `len` of `npos` runs to the end of the span. == Return Value A span over the requested range. == Parameters [cols="1,4"] |=== | Name| Description | *pos* | Index of the first element of the subspan. | *len* | Number of elements in the subspan, or `npos` for the rest. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#