ArkScript
A small, fast, functional and scripting language for video games
Utils.cpp File Reference
#include <CLI/REPL/Utils.hpp>
#include <regex>
#include <algorithm>
Include dependency graph for Utils.cpp:

Go to the source code of this file.

Namespaces

namespace  Ark
 
namespace  Ark::internal
 

Functions

long Ark::internal::countOpenEnclosures (const std::string &line, char open, char close)
 Count the open enclosure and its counterpart: (), {}, [].
 
void Ark::internal::trimWhitespace (std::string &line)
 Remove whitespaces at the start and end of a string.
 
std::size_t Ark::internal::codepointLength (const std::string &str)
 
std::size_t Ark::internal::contextLen (const std::string &prefix)
 
replxx::Replxx::completions_t Ark::internal::hookCompletion (const std::vector< std::string > &words, const std::string &context, int &length)
 
void Ark::internal::hookColor (const std::vector< std::pair< std::string, replxx::Replxx::Color > > &words_colors, const std::string &context, replxx::Replxx::colors_t &colors)
 
replxx::Replxx::hints_t Ark::internal::hookHint (const std::vector< std::string > &words, const std::string &context, int &length, replxx::Replxx::Color &color)