#include "kappa/util.hpp" #include #include #include namespace kappa::util { std::string to_lower(std::string_view sv) { std::string s(sv); std::ranges::transform(s, s.begin(), [](unsigned char c) { return std::tolower(c); }); return s; } std::string shell_escape(std::string_view s) { std::string result; result.reserve(s.size()); for (char c : s) { if (c == '"' || c == '\\' || c == '$' || c == '`') { result += '\\'; } result += c; } return result; } }