MCPcopy Create free account
hub / github.com/p-ranav/tabulate / trim_right

Method trim_right

include/tabulate/format.hpp:734–741  ·  view source on GitHub ↗

trim white spaces from right end of an input string

Source from the content-addressed store, hash-verified

732
733 // trim white spaces from right end of an input string
734 static std::string trim_right(const std::string &input_string) {
735 std::string result = input_string;
736 result.erase(
737 std::find_if(result.rbegin(), result.rend(), [](int ch) { return !std::isspace(ch); })
738 .base(),
739 result.end());
740 return result;
741 }
742
743 // trim white spaces from either end of an input string
744 static std::string trim(const std::string &input_string) {

Callers

nothing calls this directly

Calls 3

rbeginMethod · 0.45
rendMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected