create overloads

Synopses

Declared in <bdlb_indexspanstringutil.h>

Return an IndexSpan describing subString within string.

static
IndexSpan
create(
    std::string_view const& string,
    std::string_view const& subString);

Same as the preceding overload for wide‐character views.

static
IndexSpan
create(
    std::wstring_view const& string,
    std::wstring_view const& subString);

Same as the preceding overload for the specified string type.

Same as the preceding overload for the specified string type.

Same as the preceding overload for the specified string type.

Same as the preceding overload for the specified string type.

Same as the preceding overload for the specified string type.

Same as the preceding overload for the specified string type.

Same as the preceding overload for the specified string type.

static
IndexSpan
create(
    std::pmr::string const& string,
    std::pmr::string::const_iterator begin,
    std::pmr::string::const_iterator end);

Same as the preceding overload for the specified string type.

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

Same as the preceding overload for the specified string type.

static
IndexSpan
create(
    std::string const& string,
    std::string::const_iterator begin,
    std::string::const_iterator end);

Same as the preceding overload for the specified string type.

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

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

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

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

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

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

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

Same as the preceding overload for the specified string type.

Same as the preceding overload for the specified string type.

Same as the preceding overload for the specified string type.

static
IndexSpan
create(
    std::pmr::wstring const& string,
    std::pmr::wstring::const_iterator begin,
    std::pmr::wstring::const_iterator end);

Same as the preceding overload for the specified string type.

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

Same as the preceding overload for the specified string type.

static
IndexSpan
create(
    std::wstring const& string,
    std::wstring::const_iterator begin,
    std::wstring::const_iterator end);

Same as the preceding overload for the specified string type.

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

Same as the preceding overload for the specified string type.

static
IndexSpan
create(
    std::wstring_view const& string,
    std::wstring_view::const_iterator begin,
    std::wstring_view::const_iterator end);

Same as the preceding overload for the specified string type.

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

Same as the preceding overload for wide‐character string.

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

Return Value

  • an IndexSpan describing subString within string

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

  • an IndexSpan describing the substring at begin of length

Parameters

Name

Description

string

string containing the substring

subString

view defining the substring within string

begin

iterator to the start of the substring

end

iterator one past the end of the substring

length

length of the substring

Created with MrDocs