Quick Links: |
#include <bdlb_indexspanstringutil.h>
Static Public Member Functions | |
static bsl::string_view | bind (const bsl::string_view &string, const IndexSpan &span) |
static bsl::wstring_view | bind (const bsl::wstring_view &string, const IndexSpan &span) |
static IndexSpan | createFromPositions (const bsl::string_view &string, IndexSpan::size_type begin, IndexSpan::size_type end) |
static IndexSpan | createFromPositions (const bsl::wstring_view &string, IndexSpan::size_type begin, IndexSpan::size_type end) |
static IndexSpan | create (const bsl::string_view &string, IndexSpan::size_type begin, IndexSpan::size_type length) |
static IndexSpan | create (const bsl::wstring_view &string, IndexSpan::size_type begin, IndexSpan::size_type length) |
static IndexSpan | create (const bsl::string_view &string, const bsl::string_view &subString) |
static IndexSpan | create (const bsl::wstring_view &string, const bsl::wstring_view &subString) |
static IndexSpan | create (const bsl::string_view &string, bsl::string_view::const_iterator begin, IndexSpan::size_type length) |
static IndexSpan | create (const bsl::wstring_view &string, bsl::wstring_view::const_iterator begin, IndexSpan::size_type length) |
static IndexSpan | create (const bslstl::StringRef &string, bslstl::StringRef::const_iterator begin, IndexSpan::size_type length) |
static IndexSpan | create (const bslstl::StringRefWide &string, bslstl::StringRefWide::const_iterator begin, IndexSpan::size_type length) |
static IndexSpan | create (const bsl::string &string, bsl::string::const_iterator begin, IndexSpan::size_type length) |
static IndexSpan | create (const bsl::wstring &string, bsl::wstring::const_iterator begin, IndexSpan::size_type length) |
static IndexSpan | create (const std::string &string, std::string::const_iterator begin, IndexSpan::size_type length) |
static IndexSpan | create (const std::wstring &string, std::wstring::const_iterator begin, IndexSpan::size_type length) |
static IndexSpan | create (const bsl::string_view &string, bsl::string_view::const_iterator begin, bsl::string_view::const_iterator end) |
static IndexSpan | create (const bsl::wstring_view &string, bsl::wstring_view::const_iterator begin, bsl::wstring_view::const_iterator end) |
static IndexSpan | create (const bslstl::StringRef &string, bslstl::StringRef::const_iterator begin, bslstl::StringRef::const_iterator end) |
static IndexSpan | create (const bslstl::StringRefWide &string, bslstl::StringRefWide::const_iterator begin, bslstl::StringRefWide::const_iterator end) |
static IndexSpan | create (const bsl::string &string, bsl::string::const_iterator begin, bsl::string::const_iterator end) |
static IndexSpan | create (const bsl::wstring &string, bsl::wstring::const_iterator begin, bsl::wstring::const_iterator end) |
static IndexSpan | create (const std::string &string, std::string::const_iterator begin, std::string::const_iterator end) |
static IndexSpan | create (const std::wstring &string, std::wstring::const_iterator begin, std::wstring::const_iterator end) |
This struct serves as a namespace for utility functions that operate on IndexSpan
and string objects.
See Component bdlb_indexspanstringutil
static bsl::string_view bdlb::IndexSpanStringUtil::bind | ( | const bsl::string_view & | string, | |
const IndexSpan & | span | |||
) | [static] |
static bsl::wstring_view bdlb::IndexSpanStringUtil::bind | ( | const bsl::wstring_view & | string, | |
const IndexSpan & | span | |||
) | [static] |
Return a string reference to the substring of the specified string
as described by the specified span
, meaning the substring starting at the span.position()
index in string
and having span.length()
characters. The behavior is undefined unless span.position() <= string.length()
and span.position() + span.length() <= string.length()
.
static IndexSpan bdlb::IndexSpanStringUtil::createFromPositions | ( | const bsl::string_view & | string, | |
IndexSpan::size_type | begin, | |||
IndexSpan::size_type | end | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::createFromPositions | ( | const bsl::wstring_view & | string, | |
IndexSpan::size_type | begin, | |||
IndexSpan::size_type | end | |||
) | [static] |
Return an IndexSpan
describing the substring of the specified string
starting at the specified begin
and ending (not including) the specified end
. The behavior is undefined unless begin <= string.length()
and end <= string.length()
.
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::string_view & | string, | |
IndexSpan::size_type | begin, | |||
IndexSpan::size_type | length | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::wstring_view & | string, | |
IndexSpan::size_type | begin, | |||
IndexSpan::size_type | length | |||
) | [static] |
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.length()
and begin + length <= string.length()
.
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::string_view & | string, | |
const bsl::string_view & | subString | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::wstring_view & | string, | |
const bsl::wstring_view & | subString | |||
) | [static] |
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()
.
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::string_view & | string, | |
bsl::string_view::const_iterator | begin, | |||
IndexSpan::size_type | length | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::wstring_view & | string, | |
bsl::wstring_view::const_iterator | begin, | |||
IndexSpan::size_type | length | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bslstl::StringRef & | string, | |
bslstl::StringRef::const_iterator | begin, | |||
IndexSpan::size_type | length | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bslstl::StringRefWide & | string, | |
bslstl::StringRefWide::const_iterator | begin, | |||
IndexSpan::size_type | length | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::string & | string, | |
bsl::string::const_iterator | begin, | |||
IndexSpan::size_type | length | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::wstring & | string, | |
bsl::wstring::const_iterator | begin, | |||
IndexSpan::size_type | length | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const std::string & | string, | |
std::string::const_iterator | begin, | |||
IndexSpan::size_type | length | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const std::wstring & | string, | |
std::wstring::const_iterator | begin, | |||
IndexSpan::size_type | length | |||
) | [static] |
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()
.
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::string_view & | string, | |
bsl::string_view::const_iterator | begin, | |||
bsl::string_view::const_iterator | end | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::wstring_view & | string, | |
bsl::wstring_view::const_iterator | begin, | |||
bsl::wstring_view::const_iterator | end | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bslstl::StringRef & | string, | |
bslstl::StringRef::const_iterator | begin, | |||
bslstl::StringRef::const_iterator | end | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bslstl::StringRefWide & | string, | |
bslstl::StringRefWide::const_iterator | begin, | |||
bslstl::StringRefWide::const_iterator | end | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::string & | string, | |
bsl::string::const_iterator | begin, | |||
bsl::string::const_iterator | end | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const bsl::wstring & | string, | |
bsl::wstring::const_iterator | begin, | |||
bsl::wstring::const_iterator | end | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const std::string & | string, | |
std::string::const_iterator | begin, | |||
std::string::const_iterator | end | |||
) | [static] |
static IndexSpan bdlb::IndexSpanStringUtil::create | ( | const std::wstring & | string, | |
std::wstring::const_iterator | begin, | |||
std::wstring::const_iterator | end | |||
) | [static] |
Return an IndexSpan
describing the substring of the specified string
starting at the specified begin
and ending (not including) the specified end
. The behavior is undefined unless begin >= string.begin()
, begin <= string.end()
, end <= string.end()
, and begin <= end
.