#ifndef UTILS_H #define UTILS_H #include #include #include #include #include // pair #include // utility functions go here bool replace(std::string &str, const std::string &from, const std::string &to); bool replace(std::string &str, const char *from, const char *to); bool file_exists(const std::string &name); bool file_exists(const char *name); void string_toupper(std::string &str); bool iequals(const std::string &a, const std::string &b); std::vector> find_words(const std::string &text); std::vector split(const std::string &text, char sep); // logger access extern std::function get_logger; extern std::function cls_display_starfield; extern std::function press_a_key; // configuration settings access #include "yaml-cpp/yaml.h" extern YAML::Node config; #endif