#include <cstdlib>
#include <dlfcn.h>
#include <algorithm>
#include <filesystem>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <ranges>
#include <regex>
#include <string>
#include <system_error>
#include <boost/algorithm/string.hpp>
#include <boost/version.hpp>
#include <boost/program_options.hpp>
#include <boost/exception/all.hpp>
#include <boost/property_tree/info_parser.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include "Options.h"
#include "colours.h"
#include "version.h"
◆ set_mute()
void set_mute |
( |
bool |
flag | ) |
|
Function used by Boost::PO to disable standard error.
97 if (flag) cout.setstate(ios_base::failbit);
◆ wrap_paragraph()
string wrap_paragraph |
( |
const string & |
text | ) |
|
Wraps a given paragraph to fit within the same number of characters as the standard helper message from Boost Program Options.
156 if (text.size() == 0)
return text;
158 vector<string> paragraphs;
159 al::split(paragraphs, text, al::is_any_of(
"\n"));
162 for (
auto const& paragraph: paragraphs) {
163 vector<string> words;
164 al::split(words, paragraph, al::is_any_of(
" \t"), al::token_compress_on);
167 for (
auto const& word: words) {
168 size_t s = line.size() + word.size();
169 static const size_t sMax = po::options_description::m_default_line_length;
182 wrapped += line +
'\n';