diff --git a/include/cb.h b/include/cb.h index ef50683..52aec90 100644 --- a/include/cb.h +++ b/include/cb.h @@ -18,6 +18,9 @@ #endif +//#define CB_EXCLUDE_FORMATTED_PRINTS + + #include "cb/test/test.h" #include "cb/time/time.h" #include "cb/types/types.h" diff --git a/src/cb/argparser/argument_parser.cpp b/src/cb/argparser/argument_parser.cpp index 4374b66..aed9436 100644 --- a/src/cb/argparser/argument_parser.cpp +++ b/src/cb/argparser/argument_parser.cpp @@ -186,9 +186,11 @@ std::string cb::argparser::ArgumentParser::get_help() { if (not positional_arguments.empty()) { help_message += "Positional Arguments:\n"; for (auto &&arg: positional_arguments) { +#ifndef CB_EXCLUDE_FORMATTED_PRINTS help_message += std::format("{:15} {}\n", arg.name, arg.description); +#endif } help_message += "\n"; } @@ -196,10 +198,12 @@ std::string cb::argparser::ArgumentParser::get_help() { if (not arguments.empty()) { help_message += "Arguments:\n"; for (auto &&arg: arguments) { +#ifndef CB_EXCLUDE_FORMATTED_PRINTS help_message += std::format("{:5} {:15} {}\n", arg.short_name, arg.name, arg.description); +#endif } help_message += "\n"; }