MCPcopy Create free account
hub / github.com/apache/trafficserver / rtrim_if

Function rtrim_if

plugins/compress/configuration.cc:49–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void
50rtrim_if(string &s, int (*fp)(int))
51{
52 for (ssize_t i = static_cast<ssize_t>(s.size()) - 1; i >= 0; i--) {
53 if (fp(s[i])) {
54 s.erase(i, 1);
55 } else {
56 break;
57 }
58 }
59}
60
61void
62trim_if(string &s, int (*fp)(int))

Callers 1

trim_ifFunction · 0.85

Calls 2

sizeMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected