BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlb::IndexSpanStringUtil Struct Reference

#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)
 

Detailed Description

This struct serves as a namespace for utility functions that operate on IndexSpan and string objects.

Member Function Documentation

◆ bind() [1/2]

bsl::string_view bdlb::IndexSpanStringUtil::bind ( const bsl::string_view string,
const IndexSpan span 
)
inlinestatic

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().

◆ bind() [2/2]

bsl::wstring_view bdlb::IndexSpanStringUtil::bind ( const bsl::wstring_view string,
const IndexSpan span 
)
inlinestatic

◆ create() [1/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::string string,
bsl::string::const_iterator  begin,
bsl::string::const_iterator  end 
)
inlinestatic

◆ create() [2/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::string string,
bsl::string::const_iterator  begin,
IndexSpan::size_type  length 
)
inlinestatic

◆ create() [3/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::string_view string,
bsl::string_view::const_iterator  begin,
bsl::string_view::const_iterator  end 
)
inlinestatic

◆ create() [4/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::string_view string,
bsl::string_view::const_iterator  begin,
IndexSpan::size_type  length 
)
inlinestatic

◆ create() [5/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::string_view string,
const bsl::string_view subString 
)
inlinestatic

◆ create() [6/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::string_view string,
IndexSpan::size_type  begin,
IndexSpan::size_type  length 
)
inlinestatic

◆ create() [7/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::wstring string,
bsl::wstring::const_iterator  begin,
bsl::wstring::const_iterator  end 
)
inlinestatic

◆ create() [8/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::wstring string,
bsl::wstring::const_iterator  begin,
IndexSpan::size_type  length 
)
inlinestatic

◆ create() [9/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::wstring_view string,
bsl::wstring_view::const_iterator  begin,
bsl::wstring_view::const_iterator  end 
)
inlinestatic

◆ create() [10/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::wstring_view string,
bsl::wstring_view::const_iterator  begin,
IndexSpan::size_type  length 
)
inlinestatic

◆ create() [11/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::wstring_view string,
const bsl::wstring_view subString 
)
inlinestatic

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().

◆ create() [12/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bsl::wstring_view string,
IndexSpan::size_type  begin,
IndexSpan::size_type  length 
)
inlinestatic

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().

◆ create() [13/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bslstl::StringRef string,
bslstl::StringRef::const_iterator  begin,
bslstl::StringRef::const_iterator  end 
)
inlinestatic

◆ create() [14/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bslstl::StringRef string,
bslstl::StringRef::const_iterator  begin,
IndexSpan::size_type  length 
)
inlinestatic

◆ create() [15/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bslstl::StringRefWide string,
bslstl::StringRefWide::const_iterator  begin,
bslstl::StringRefWide::const_iterator  end 
)
inlinestatic

◆ create() [16/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const bslstl::StringRefWide string,
bslstl::StringRefWide::const_iterator  begin,
IndexSpan::size_type  length 
)
inlinestatic

◆ create() [17/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const std::string &  string,
std::string::const_iterator  begin,
IndexSpan::size_type  length 
)
inlinestatic

◆ create() [18/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const std::string &  string,
std::string::const_iterator  begin,
std::string::const_iterator  end 
)
inlinestatic

◆ create() [19/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const std::wstring &  string,
std::wstring::const_iterator  begin,
IndexSpan::size_type  length 
)
inlinestatic

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().

◆ create() [20/20]

IndexSpan bdlb::IndexSpanStringUtil::create ( const std::wstring &  string,
std::wstring::const_iterator  begin,
std::wstring::const_iterator  end 
)
inlinestatic

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.

◆ createFromPositions() [1/2]

IndexSpan bdlb::IndexSpanStringUtil::createFromPositions ( const bsl::string_view string,
IndexSpan::size_type  begin,
IndexSpan::size_type  end 
)
inlinestatic

◆ createFromPositions() [2/2]

IndexSpan bdlb::IndexSpanStringUtil::createFromPositions ( const bsl::wstring_view string,
IndexSpan::size_type  begin,
IndexSpan::size_type  end 
)
inlinestatic

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().


The documentation for this struct was generated from the following file: