Return an IndexSpan shrunk from the ends of the specified original.
Declared in <bdlb_indexspanutil.h>
static
IndexSpan
shrink(
IndexSpan const& original,
IndexSpan::size_type shrinkBegin,
IndexSpan::size_type shrinkEnd);
The result is transformed using the specified shrinkBegin and shrinkEnd so that its position is original.position() + shrinkBegin and whose length is original.length() - (shrinkBegin + shrinkEnd). The behavior is undefined unless shrinkBegin + shrinkEnd <= original.length().
an IndexSpan shrunk from the ends of original
| Name | Description |
|---|---|
| original | span to shrink |
| shrinkBegin | number of elements to remove from the start |
| shrinkEnd | number of elements to remove from the end |