createFromPositions overloads

Synopses

Declared in <bdlb_indexspanstringutil.h>

Return an IndexSpan for the half‐open range [`begin`, end) in] string.

static
IndexSpan
createFromPositions(
    std::string_view const& string,
    IndexSpan::size_type begin,
    IndexSpan::size_type end);

Same as the preceding overload for wide‐character string.

static
IndexSpan
createFromPositions(
    std::wstring_view const& string,
    IndexSpan::size_type begin,
    IndexSpan::size_type end);

Return Value

an IndexSpan describing the half‐open range [`begin`, end)]

Parameters

Name

Description

string

string containing the substring

begin

starting position of the substring

end

one‐past‐the‐end position of the substring

Created with MrDocs