From 2628f4859d1250923d2d3d9d52da6d192c5f1e2e Mon Sep 17 00:00:00 2001 From: Mark Jenkinson <mark@fmrib.ox.ac.uk> Date: Tue, 9 Sep 2003 17:41:12 +0000 Subject: [PATCH] Made ~ a non-breaking space character at start of strings - useful for keeping help message next to option names. For example: to get "-thresh <value> binary threshold" you put in "~<value>\tbinary threshold" as the help text --- functions.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/functions.cc b/functions.cc index b5c44af..bd5cb12 100644 --- a/functions.cc +++ b/functions.cc @@ -96,9 +96,13 @@ namespace Utilities { } ostream& operator<<(ostream &os, const BaseOption& o) { - return os << - "\t" << o.key() << - "\t" << o.help_text(); + string test=o.help_text(); + if ((test.length()>=1) && (test[0]=='~')) { + test[0]=' '; + return os << "\t" << o.key() << test; + } else { + return os << "\t" << o.key() << "\t" << o.help_text(); + } } } -- GitLab