MCPcopy Create free account
hub / github.com/catboost/catboost / ErasePattern

Method ErasePattern

library/cpp/cgiparam/cgiparam.cpp:59–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59bool TCgiParameters::ErasePattern(const TStringBuf name, const TStringBuf pat) {
60 const auto pair = equal_range(name);
61
62 bool found = false;
63 for (auto it = pair.first; it != pair.second;) {
64 bool startsWith = it->second.StartsWith(pat);
65 if (startsWith) {
66 it = erase(it);
67 found = true;
68 } else {
69 ++it;
70 }
71 }
72
73 return found;
74}
75
76size_t TCgiParameters::EraseAll(const TStringBuf name) {
77 size_t num = 0;

Callers

nothing calls this directly

Calls 3

equal_rangeFunction · 0.50
eraseFunction · 0.50
StartsWithMethod · 0.45

Tested by

no test coverage detected