MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / writeWithWidthStrict

Function writeWithWidthStrict

src/Client/ProgressTable.cpp:181–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179
180template <typename Out>
181void writeWithWidthStrict(Out & out, std::string_view s, size_t width)
182{
183 constexpr std::string_view ellipsis = "…";
184 if (s.size() > width)
185 if (width <= ellipsis.size())
186 out << s.substr(0, width);
187 else
188 out << s.substr(0, width - ellipsis.size()) << ellipsis;
189 else
190 out << s;
191}
192
193}
194

Callers 1

writeTableMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected