#include "../include/dchat/Process.hpp" namespace dchat { std::string escapeCommandArg(const std::string &cmd) { std::string result; result.reserve(cmd.size()); result += "'"; for(char c : cmd) { if(c == '\'') result += "\"'\""; // "'" else result += c; } result += "'"; return result; } }