trim overloads
Synopses
Declared in <bdlb_string.h>
Remove all leading and 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
trim(char* string);
Remove all leading and trailing whitespace characters from the specified string.
static
void
trim(bsl::string* string);
Remove all leading and trailing whitespace characters from the specified string.
static
void
trim(std::pmr::string* string);
Remove all leading and trailing whitespace characters from the specified string.
static
void
trim(std::string* string);
Remove all leading and trailing whitespace characters from the specified string having the specified length, and load into length the number of characters in the resulting (trimmed) 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 0 <= *length. Note that length is both an input and output parameter. See bdlb_stringviewutil for an identically named method having similar semantics taking (and returning) bsl::string_view.
static
void
trim(
char* string,
int* length);
Created with MrDocs