MCPcopy Create free account
hub / github.com/ValveSoftware/GameNetworkingSockets / ltrim

Function ltrim

examples/example_chat.cpp:194–198  ·  view source on GitHub ↗

trim from start (in place)

Source from the content-addressed store, hash-verified

192
193// trim from start (in place)
194static inline void ltrim(std::string &s) {
195 s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) {
196 return !std::isspace(ch);
197 }));
198}
199
200// trim from end (in place)
201static inline void rtrim(std::string &s) {

Callers 1

LocalUserInput_GetNextFunction · 0.85

Calls 3

eraseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected