Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jarro2783/cxxopts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSourabh Mehta <73165318+soumeh01@users.noreply.github.com>2022-11-09 23:24:19 +0300
committerGitHub <noreply@github.com>2022-11-09 23:24:19 +0300
commit1dcb44e79a17e703e024594487b3a442d87e4741 (patch)
treeffa4b19b809687aa581ac7ecd4b2ccfd39be2b1e /include
parentf087dc8fcdcd6aabba68e671ae17ff3e975134f4 (diff)
Fix an additional space in help generated (#377)HEADmaster
Diffstat (limited to 'include')
-rw-r--r--include/cxxopts.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp
index 8028b67..e84e876 100644
--- a/include/cxxopts.hpp
+++ b/include/cxxopts.hpp
@@ -2742,7 +2742,12 @@ Options::help(const std::vector<std::string>& help_groups, bool print_usage) con
String result = m_help_string;
if(print_usage)
{
- result+= "\nUsage:\n " + toLocalString(m_program) + " " + toLocalString(m_custom_help);
+ result+= "\nUsage:\n " + toLocalString(m_program);
+ }
+
+ if (!m_custom_help.empty())
+ {
+ result += " " + toLocalString(m_custom_help);
}
if (!m_positional.empty() && !m_positional_help.empty()) {