| 2654 | } |
| 2655 | |
| 2656 | inline |
| 2657 | std::string |
| 2658 | Options::help(const std::vector<std::string>& help_groups) const |
| 2659 | { |
| 2660 | String result = m_help_string + "\nUsage:\n " + |
| 2661 | toLocalString(m_program) + " " + toLocalString(m_custom_help); |
| 2662 | |
| 2663 | if (!m_positional.empty() && !m_positional_help.empty()) { |
| 2664 | result += " " + toLocalString(m_positional_help); |
| 2665 | } |
| 2666 | |
| 2667 | result += "\n\n"; |
| 2668 | |
| 2669 | if (help_groups.empty()) |
| 2670 | { |
| 2671 | generate_all_groups_help(result); |
| 2672 | } |
| 2673 | else |
| 2674 | { |
| 2675 | generate_group_help(result, help_groups); |
| 2676 | } |
| 2677 | |
| 2678 | return toUTF8String(result); |
| 2679 | } |
| 2680 | |
| 2681 | inline |
| 2682 | std::vector<std::string> |
no test coverage detected