BloombergLP::bdlb::StringViewUtil

This struct provides a namespace for a suite of functions on bsl::string_view containers.

Synopsis

Declared in <bdlb_stringviewutil.h>

struct StringViewUtil;

Type Aliases

NameDescription
size_type Size type of string_view containers.

Static Member Functions

NameDescription
areEqualCaseless Return true if lhs and rhs are equal ignoring case.
endsWith endsWith overloads
findFirstNotOf Return the position of the first character not in characters.
findFirstOf Return the position of the first character from characters.
findLastNotOf Return the position of the last character not in characters.
findLastOf Return the position of the last character from characters.
lowerCaseCmp Compare lhs and rhs after converting both to lower case.
ltrim Return a view of string with leading whitespace removed.
rtrim Return a view of string with trailing whitespace removed.
startsWith startsWith overloads
strrstr Return a view of the last occurrence of subString in string.
strrstrCaseless Return a view of the last case-insensitive match of subString.
strstr Return a view of the first occurrence of subString in string.
strstrCaseless Return a view of the first case-insensitive match of subString.
substr Return a substring of string starting at position.
trim Return a view of string with leading and trailing whitespace removed.
upperCaseCmp Compare lhs and rhs after converting both to upper case.

Static Data Members

NameDescription
k_NPOS Value used to denote "not-a-position", guaranteed to be outside the range[0 .. bsl::string_view::max_size()].