Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
84
void 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
91
void StripContext(std::string* s) {
92
StripTail(s);
Callers
1
StripContext
Function · 0.85
Calls
3
remove_suffix
Method · 0.80
size
Method · 0.45
data
Method · 0.45
Tested by
no test coverage detected