[#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`&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;indexspanstringutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlb/IndexSpan.adoc[IndexSpan]
create(
    std::string&lowbar;view const& string,
    std::string&lowbar;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`&period; The behavior is undefined unless `subString&period;begin() &lt;&equals; string&period;end()`, `subString&period;end() &lt;&equals; string&period;end()`, `subString&period;begin() &gt;&equals; string&period;begin()`, and `subString&period;end() &lt;&equals; string&period;begin()`&period;

== 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]#
