BloombergLP::bdlb::StringRefUtil

This struct provides a namespace for a suite of functions on bslstl::StringRef references to strings.

Synopsis

Declared in <bdlb_stringrefutil.h>

struct StringRefUtil;

Type Aliases

NameDescription
size_type Size type of string references.

Static Member Functions

NameDescription
areEqualCaseless Return true if lhs and rhs compare equal ignoring case.
findFirstNotOf Return the position of the first non-matching character in string.
findFirstOf Return the position of the first matching character in string.
findLastNotOf Return the position of the last non-matching character in string.
findLastOf Return the position of the last matching character in string.
lowerCaseCmp Compare lhs and rhs after converting both to lower case.
ltrim Return a string reference with leading whitespace removed.
rtrim Return a string reference with trailing whitespace removed.
strrstr Return a reference to the last occurrence of subString in string.
strrstrCaseless Return a reference to the last case-insensitive occurrence of subString in string.
strstr Return a reference to the first occurrence of subString in string.
strstrCaseless Return a reference to the first case-insensitive occurrence of subString in string.
substr Return a substring of string starting at position.
trim Return a string reference 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 .. INT_MAX].