MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / rtrim

Function rtrim

Hackerrank_problems/diagonal-difference/solution.cpp:84–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84string rtrim(const string &str) {
85 string s(str);
86
87 s.erase(
88 find_if(s.rbegin(), s.rend(), not1(ptr_fun<int, int>(isspace))).base(),
89 s.end()
90 );
91
92 return s;
93}
94
95vector<string> split(const string &str) {
96 vector<string> tokens;

Callers 2

mainFunction · 0.70
lengthOfLastWordMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected