rtrim overloads

Synopses

Declared in <bdlb_string.h>

Remove all trailing whitespace characters from the specified string. If string consists of only whitespace then it will be empty (i.e., have 0 length) after this operation. The behavior is undefined unless string‐>size() <= INT_MAX (if applicable). See bdlb_stringviewutil for an identically named method having similar semantics taking (and returning) bsl::string_view.

static
void
rtrim(char* string);

Remove all trailing whitespace characters from the specified string.

static
void
rtrim(bsl::string* string);

Remove all trailing whitespace characters from the specified string. If string consists of only whitespace then it will be empty (i.e., have 0 length) after this operation.

static
void
rtrim(std::pmr::string* string);

Remove all trailing whitespace characters from the specified string. If string consists of only whitespace then it will be empty (i.e., have 0 length) after this operation.

static
void
rtrim(std::string* string);

Determine the number of characters that the specified string having the specified length would have if all trailing whitespace characters were removed and load the result into *length. string is not modified. The behavior is undefined unless 0 <= *length. Note that length is both an input and output parameter.

static
void
rtrim(
    char const* string,
    int* length);

Created with MrDocs