8#ifndef INCLUDED_BDLB_STRINGVIEWUTIL
9#define INCLUDED_BDLB_STRINGVIEWUTIL
194#include <bdlscm_version.h>
198#include <bsl_algorithm.h>
199#include <bsl_string_view.h>
371 const char *characters);
382 const char *characters);
430 bsl::min(numChars,
string.length() - position));
439 if (characters.
length() >
string.length()) {
447 const char *characters)
451 const char *nextChar = characters;
453 while (stringIt !=
string.end()) {
454 if (0 == *nextChar) {
457 if (*nextChar != *stringIt) {
463 return 0 == *nextChar;
469 return (!
string.empty() && character ==
string.front());
476 if (
string.length() < characters.
length()) {
488 const char *characters)
498 return (!
string.empty() && character ==
string.back());
Definition bslstl_stringview.h:441
std::size_t size_type
Definition bslstl_stringview.h:457
BSLS_KEYWORD_CONSTEXPR size_type length() const BSLS_KEYWORD_NOEXCEPT
Return the length of this view.
Definition bslstl_stringview.h:1685
BSLS_KEYWORD_CONSTEXPR const_pointer data() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:1760
BSLS_KEYWORD_CONSTEXPR_CPP17 int compare(basic_string_view other) const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:1818
static const size_type npos
Definition bslstl_stringview.h:465
const value_type * const_iterator
Definition bslstl_stringview.h:451
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlb_algorithmworkaroundutil.h:74
basic_string_view< char > string_view
Definition bslstl_stringview.h:1053
Definition bdlb_stringviewutil.h:209
static size_type findFirstNotOf(const bsl::string_view &string, const bsl::string_view &characters, size_type position=0)
static const size_type k_NPOS
Definition bdlb_stringviewutil.h:220
static bsl::string_view rtrim(const bsl::string_view &string)
static int lowerCaseCmp(const bsl::string_view &lhs, const bsl::string_view &rhs)
static bsl::string_view ltrim(const bsl::string_view &string)
bsl::string_view::size_type size_type
Size type of string_view containers.
Definition bdlb_stringviewutil.h:214
static size_type findLastNotOf(const bsl::string_view &string, const bsl::string_view &characters, size_type position=k_NPOS)
static bsl::string_view strrstr(const bsl::string_view &string, const bsl::string_view &subString)
static bsl::string_view strrstrCaseless(const bsl::string_view &string, const bsl::string_view &subString)
static bsl::string_view substr(const bsl::string_view &string, size_type position=0, size_type numChars=k_NPOS)
Definition bdlb_stringviewutil.h:423
static size_type findLastOf(const bsl::string_view &string, const bsl::string_view &characters, size_type position=k_NPOS)
static int upperCaseCmp(const bsl::string_view &lhs, const bsl::string_view &rhs)
static bool areEqualCaseless(const bsl::string_view &lhs, const bsl::string_view &rhs)
Definition bdlb_stringviewutil.h:402
static bool startsWith(const bsl::string_view &string, const bsl::string_view &characters)
Definition bdlb_stringviewutil.h:436
static bsl::string_view trim(const bsl::string_view &string)
Definition bdlb_stringviewutil.h:415
static bool endsWith(const bsl::string_view &string, const bsl::string_view &characters)
Definition bdlb_stringviewutil.h:473
static size_type findFirstOf(const bsl::string_view &string, const bsl::string_view &characters, size_type position=0)
static bsl::string_view strstrCaseless(const bsl::string_view &string, const bsl::string_view &subString)
static bsl::string_view strstr(const bsl::string_view &string, const bsl::string_view &subString)