[#BloombergLP-bdlb-String-rtrim-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/String.adoc[String]::rtrim :relfileprefix: ../../../ :mrdocs: `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`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void xref:BloombergLP/bdlb/String/rtrim-0ca.adoc[rtrim](char* string); ---- [.small]#xref:BloombergLP/bdlb/String/rtrim-0ca.adoc[_» more..._]# Remove all trailing whitespace characters from the specified `string`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void xref:BloombergLP/bdlb/String/rtrim-0cd.adoc[rtrim](xref:bsl/string.adoc[bsl::string]* string); ---- [.small]#xref:BloombergLP/bdlb/String/rtrim-0cd.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void xref:BloombergLP/bdlb/String/rtrim-09.adoc[rtrim](std::pmr::string* string); ---- [.small]#xref:BloombergLP/bdlb/String/rtrim-09.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void xref:BloombergLP/bdlb/String/rtrim-02.adoc[rtrim](std::string* string); ---- [.small]#xref:BloombergLP/bdlb/String/rtrim-02.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void xref:BloombergLP/bdlb/String/rtrim-0e.adoc[rtrim]( char const* string, int* length); ---- [.small]#xref:BloombergLP/bdlb/String/rtrim-0e.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#