[#BloombergLP-bdlb-IndexSpanStringUtil-create-06] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/IndexSpanStringUtil.adoc[IndexSpanStringUtil]::create :relfileprefix: ../../../ :mrdocs: Return an `IndexSpan` describing `subString` within `string`. == Synopsis Declared in `<bdlb_indexspanstringutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bdlb/IndexSpan.adoc[IndexSpan] create( std::string_view const& string, std::string_view const& subString); ---- == Description Return an `IndexSpan` describing the substring of the specified `string` as defined by the `begin()` and `end()` of the specified `subString`. The behavior is undefined unless `subString.begin() <= string.end()`, `subString.end() <= string.end()`, `subString.begin() >= string.begin()`, and `subString.end() <= string.begin()`. == Return Value an `IndexSpan` describing `subString` within `string` == Parameters [cols="1,4"] |=== | Name| Description | *string* | string containing the substring | *subString* | view defining the substring within `string` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#