MCPcopy Create free account
hub / github.com/CLIUtils/CLI11 / modify_option

Method modify_option

fuzz/fuzzApp.cpp:565–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565void FuzzApp::modify_option(CLI::Option *opt, const std::string &modifier_string) {
566 auto mod_start = modifier_string.find("modifiers=");
567 if(mod_start == std::string::npos) {
568 return;
569 }
570 auto mod_end = modifier_string.find_first_of(' ', mod_start + 1);
571 std::string modifiers = modifier_string.substr(mod_start + 10, mod_end - mod_start - 10);
572 for(const auto mod : modifiers) {
573 switch(mod) {
574 case 'r':
575 case 'R':
576 opt->required(mod < '`');
577 break;
578 case '0':
579 case '1':
580 case '2':
581 case '3':
582 case '4':
583 opt->expected(mod - '0');
584 break;
585 case '5':
586 case '6':
587 case '7':
588 case '8':
589 case '9':
590 opt->expected(opt->get_expected_min(), mod - '5');
591 break;
592 case 'c':
593 case 'C':
594 opt->ignore_case(mod < '`');
595 break;
596 case 'u':
597 case 'U':
598 opt->ignore_underscore(mod < '`');
599 break;
600 case 'f':
601 case 'F':
602 opt->disable_flag_override(mod < '`');
603 break;
604 case 'e':
605 case 'E':
606 opt->allow_extra_args(mod < '`');
607 break;
608 case ',':
609 case ';':
610 case '%':
611 case '#':
612 case '|':
613 case '\\':
614 case '~':
615 opt->delimiter(mod);
616 break;
617 case 'g':
618 case 'G':
619 opt->configurable(mod < '`');
620 break;
621 case 'p':
622 case 'P':

Callers

nothing calls this directly

Calls 9

expectedMethod · 0.80
disable_flag_overrideMethod · 0.80
requiredMethod · 0.45
ignore_caseMethod · 0.45
ignore_underscoreMethod · 0.45
delimiterMethod · 0.45
configurableMethod · 0.45
multi_option_policyMethod · 0.45
checkMethod · 0.45

Tested by

no test coverage detected