#pragma once #include namespace utils { // replaces all occurences of in with std::string replace(std::string src, const std::string& match, const std::string& replacement) { for(size_t pos = src.find(match); pos != std::string::npos; pos = src.find(match, pos + replacement.size())) src.erase(pos, match.length()).insert(pos, replacement); return src; } }