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

Function rtrim

examples/example_chat.cpp:201–205  ·  view source on GitHub ↗

trim from end (in place)

Source from the content-addressed store, hash-verified

199
200// trim from end (in place)
201static inline void rtrim(std::string &s) {
202 s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) {
203 return !std::isspace(ch);
204 }).base(), s.end());
205}
206
207
208// Read the next line of input from stdin, if anything is available.

Callers 1

LocalUserInput_GetNextFunction · 0.85

Calls 2

eraseMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected