BloombergLP::bdlb::IndexSpanStringUtil::create

Return an IndexSpan for the substring of string at begin of length.

Synopsis

Declared in <bdlb_indexspanstringutil.h>

static
IndexSpan
create(
    std::string_view const& string,
    std::string_view::const_iterator begin,
    IndexSpan::size_type length);

Description

Return an IndexSpan describing the substring of the specified string starting at the specified begin and having the specified length. The behavior is undefined unless begin >= string.begin(), begin <= string.end(), and begin + length <= string.end().

Return Value

an IndexSpan describing the substring at begin of length

Parameters

NameDescription
stringstring containing the substring
beginiterator to the start of the substring
lengthlength of the substring