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

Function FinishItems

tools/enum_parser/enum_parser/main.cpp:105–113  ·  view source on GitHub ↗

Cut trailing ",\n" or ","

Source from the content-addressed store, hash-verified

103
104/// Cut trailing ",\n" or ","
105static inline void FinishItems(TStringStream& out) {
106 TString& s = out.Str();
107 if (s.EndsWith(",\n")) {
108 s.remove(s.size() - 2, 2);
109 }
110 if (s.EndsWith(",")) {
111 s.pop_back();
112 }
113}
114
115
116static inline void OpenMap(TStringStream& out) {

Callers 2

GenerateEnumFunction · 0.85
mainFunction · 0.85

Calls 5

StrMethod · 0.45
EndsWithMethod · 0.45
removeMethod · 0.45
sizeMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected