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

Function ltrim

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

Source from the content-addressed store, hash-verified

71}
72
73string ltrim(const string &str) {
74 string s(str);
75
76 s.erase(
77 s.begin(),
78 find_if(s.begin(), s.end(), not1(ptr_fun<int, int>(isspace)))
79 );
80
81 return s;
82}
83
84string rtrim(const string &str) {
85 string s(str);

Callers 2

mainFunction · 0.70
lengthOfLastWordMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected