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

Function QuoteForHelp

library/cpp/getopt/small/last_getopt_opts.cpp:38–46  ·  view source on GitHub ↗

Like TString::Quote(), but does not quote digits-only string

Source from the content-addressed store, hash-verified

36
37 // Like TString::Quote(), but does not quote digits-only string
38 static TString QuoteForHelp(const TString& str) {
39 if (str.empty())
40 return str.Quote();
41 for (size_t i = 0; i < str.size(); ++i) {
42 if (!isdigit(str[i]))
43 return str.Quote();
44 }
45 return str;
46 }
47
48 namespace NPrivate {
49 TString OptToString(char c) {

Callers 1

PrintUsageMethod · 0.85

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected