MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / HelpMessageOpt

Function HelpMessageOpt

src/common/args.cpp:829–845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

827}
828
829std::string HelpMessageOpt(std::string_view option, std::string_view help_param, std::string_view message, bool subopt)
830{
831 constexpr int screen_width = 79;
832 int opt_indent = 2;
833 int msg_indent = 7;
834
835 if (subopt) {
836 int bump = msg_indent - opt_indent;
837 opt_indent += bump; // opt_indent now at the old msg_indent level
838 msg_indent += bump; // indent by the same amount
839 }
840 int msg_width = screen_width - msg_indent;
841
842 return strprintf("%*s%s%s\n%*s%s\n\n",
843 opt_indent, "", option, help_param,
844 msg_indent, "", FormatParagraph(message, msg_width, msg_indent));
845}
846
847const std::vector<std::string> TEST_OPTIONS_DOC{
848 "addrman (use deterministic addrman)",

Callers 2

FUZZ_TARGETFunction · 0.85
GetHelpMessageMethod · 0.85

Calls 1

FormatParagraphFunction · 0.85

Tested by 1

FUZZ_TARGETFunction · 0.68