Function printOptionDescription(const std::string&, const std::string&, int)

Function Documentation

void printOptionDescription(const std::string &option, const std::string &description, int width = 30)

Prints an option and its description aligned at the specified width.

If the option length exceeds a specified width, the description is printed on the next line with indentation matching the option part. Otherwise, the option and description are printed on the same line.

Parameters:
  • option – The command line option to be printed (e.g., “–train_data_file <str>”).

  • description – The description for the command line option.

  • width – The fixed width for the start of the description part.