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

Function FindUserTypos

library/cpp/getopt/small/last_getopt_parse_result.cpp:169–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167 }
168
169 void FindUserTypos(const TString& arg, const TOpts* options) {
170 if (arg.size() < 4 || !arg.StartsWith("-")) {
171 return;
172 }
173
174 for (auto opt: options->Opts_) {
175 for (auto name: opt->GetLongNames()) {
176 if ("-" + name == arg) {
177 throw TUsageException() << "did you mean `-" << arg << "` (with two dashes)?";
178 }
179 }
180 }
181 }
182
183 void TOptsParseResult::Init(const TOpts* options, int argc, const char** argv) {
184 try {

Callers 1

InitMethod · 0.85

Calls 3

TUsageExceptionClass · 0.85
sizeMethod · 0.45
StartsWithMethod · 0.45

Tested by

no test coverage detected