| 2725 | } |
| 2726 | |
| 2727 | inline |
| 2728 | std::string |
| 2729 | Options::help(const std::vector<std::string>& help_groups, bool print_usage) const |
| 2730 | { |
| 2731 | String result = m_help_string; |
| 2732 | if(print_usage) |
| 2733 | { |
| 2734 | result+= "\nUsage:\n " + toLocalString(m_program) + " " + toLocalString(m_custom_help); |
| 2735 | } |
| 2736 | |
| 2737 | if (!m_positional.empty() && !m_positional_help.empty()) { |
| 2738 | result += " " + toLocalString(m_positional_help); |
| 2739 | } |
| 2740 | |
| 2741 | result += "\n\n"; |
| 2742 | |
| 2743 | if (help_groups.empty()) |
| 2744 | { |
| 2745 | generate_all_groups_help(result); |
| 2746 | } |
| 2747 | else |
| 2748 | { |
| 2749 | generate_group_help(result, help_groups); |
| 2750 | } |
| 2751 | |
| 2752 | return toUTF8String(result); |
| 2753 | } |
| 2754 | |
| 2755 | inline |
| 2756 | std::vector<std::string> |