MCPcopy Create free account
hub / github.com/alibaba/graph-learn / StripTail

Function StripTail

graphlearn/src/common/string/string_tool.cc:84–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void StripTail(std::string* s) {
85 std::string::size_type i = s->size();
86 for (; i > 0 && ::isspace((*s)[i - 1]); --i) {
87 }
88 s->resize(i);
89}
90
91void StripContext(std::string* s) {
92 StripTail(s);

Callers 1

StripContextFunction · 0.85

Calls 3

remove_suffixMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected