| 21 | } |
| 22 | |
| 23 | void TFormattedOutput::Print(IOutputStream& out) { |
| 24 | for (auto&[indent, line] : Lines_) { |
| 25 | if (indent && !line.empty()) { |
| 26 | TTempBuf buf(indent); |
| 27 | Fill(buf.Data(), buf.Data() + indent, ' '); |
| 28 | out.Write(buf.Data(), indent); |
| 29 | } |
| 30 | out << line; |
| 31 | if (!line.EndsWith('\n')) { |
| 32 | out << Endl; |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | } |