Cut trailing ",\n" or ","
| 103 | |
| 104 | /// Cut trailing ",\n" or "," |
| 105 | static 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 | |
| 116 | static inline void OpenMap(TStringStream& out) { |