[#BloombergLP-bdlb-IndexSpanUtil-shrink] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/IndexSpanUtil.adoc[IndexSpanUtil]::shrink :relfileprefix: ../../../ :mrdocs: Return an `IndexSpan` shrunk from the ends of the specified `original`. == Synopsis Declared in `<bdlb_indexspanutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bdlb/IndexSpan.adoc[IndexSpan] shrink( xref:BloombergLP/bdlb/IndexSpan.adoc[IndexSpan] const& original, xref:BloombergLP/bdlb/IndexSpan/size_type.adoc[IndexSpan::size_type] shrinkBegin, xref:BloombergLP/bdlb/IndexSpan/size_type.adoc[IndexSpan::size_type] shrinkEnd); ---- == Description 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()`. == Return Value an `IndexSpan` shrunk from the ends of `original` == Parameters [cols="1,4"] |=== | Name| Description | *original* | span to shrink | *shrinkBegin* | number of elements to remove from the start | *shrinkEnd* | number of elements to remove from the end |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#