Compute the length of string after removing trailing whitespace.
Declared in <bdlb_string.h>
static
void
rtrim(
char const* string,
int* length);
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.
| Name | Description |
|---|---|
| string | string whose trailing whitespace length is measured |
| length | length of string; updated to the trimmed length |