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

Method FormatFullName

library/cpp/getopt/small/modchooser.cpp:273–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273TString TModChooser::TMode::FormatFullName(size_t pad, const NColorizer::TColors& colors) const {
274 TStringBuilder name;
275 if (Aliases) {
276 name << "{";
277 }
278
279 name << colors.GreenColor();
280 name << Name;
281 name << colors.OldColor();
282
283 if (Aliases) {
284 for (const auto& alias : Aliases) {
285 name << "|" << colors.GreenColor() << alias << colors.OldColor();
286 }
287 name << "}";
288 }
289
290 auto len = CalculateFullNameLen();
291 if (pad > len) {
292 name << TString(" ") * (pad - len);
293 }
294
295 return name;
296}
297
298void TModChooser::PrintHelp(const TString& progName, bool toStdErr) const {
299 auto baseName = TFsPath(progName).Basename();

Callers 1

PrintHelpMethod · 0.80

Calls 2

GreenColorMethod · 0.80
OldColorMethod · 0.80

Tested by

no test coverage detected