47std::string
unquote(std::string
const &
s, std::string
const &
pairs =
"\"\"''");
48std::string
quote(std::string
const &
s,
char open =
'"',
char close =
'\0');
69 , std::string
const &
help
76void less(std::basic_ostream<char> &
out
77 , std::string
const &
data);
The advgetopt environment to parse command line options.
size_t get_screen_width()
Retrieve the width of one line in your console.
string_list_t insert_group_name(std::string const &filename, char const *group_name, char const *project_name, bool add_default_on_empty)
Insert the group (or project) name in the filename.
void split_string(std::string const &str, string_list_t &result, string_list_t const &separators)
Split a string in sub-strings separated by separators.
bool is_false(std::string s)
Check whether a value represents "false".
std::string breakup_line(std::string line, size_t const option_width, size_t const line_width)
Breakup a string on multiple lines.
constexpr flag_t option_flags_merge()
void less(std::basic_ostream< char > &out, std::string const &data)
Print out a string to the console or use less.
std::string format_usage_string(std::string const &argument, std::string const &help, size_t const option_width, size_t const line_width)
Format a help string to make it fit on a given width.
constexpr int const DEFAULT_PRIORITY
bool is_true(std::string s)
Check whether a value represents "true".
std::string option_with_underscores(std::string const &s)
Converts an option back to using underscores.
std::string escape_shell_argument(std::string const &arg)
Escape special characters from a shell argument.
std::string quote(std::string const &s, char open, char close)
The converse of unquote.
std::set< std::string > string_set_t
std::string sanitizer_details()
Generate a string describing whether we're using the sanitizer.
size_t get_screen_height()
Retrieve the height of your console.
std::string unquote(std::string const &s, std::string const &pairs)
Remove single (') or double (") quotes from a string.
std::string option_with_dashes(std::string const &s)
Convert the _ found in a string to - instead.
std::vector< std::string > string_list_t
std::string handle_user_directory(std::string const &filename)
Replace a starting ~/... with the contents of the $HOME variable.
std::string default_group_name(std::string const &filename, char const *group_name, char const *project_name, int priority)
Generate the default filename (the ".../50-...")