12#ifndef REPL_REPLXX_UTIL_HPP
13#define REPL_REPLXX_UTIL_HPP
37 replxx::Replxx::completions_t
hookCompletion(
const std::vector<std::string>& words,
const std::string& context,
int& length);
39 void hookColor(
const std::vector<std::pair<std::string, replxx::Replxx::Color>>& words_colors,
const std::string& context, replxx::Replxx::colors_t&
colors);
41 replxx::Replxx::hints_t
hookHint(
const std::vector<std::string>& words,
const std::string& context,
int& length, replxx::Replxx::Color& color);
long countOpenEnclosures(const std::string &line, char open, char close)
Count the open enclosure and its counterpart: (), {}, [].
void hookColor(const std::vector< std::pair< std::string, replxx::Replxx::Color > > &words_colors, const std::string &context, replxx::Replxx::colors_t &colors)
constexpr std::array colors
replxx::Replxx::completions_t hookCompletion(const std::vector< std::string > &words, const std::string &context, int &length)
replxx::Replxx::hints_t hookHint(const std::vector< std::string > &words, const std::string &context, int &length, replxx::Replxx::Color &color)
void trimWhitespace(std::string &line)
Remove whitespaces at the start and end of a string.