46inline std::string
_subreplace(std::string resource_str, std::string sub_str, std::string new_str) {
47 std::string dst_str = resource_str;
48 std::string::size_type pos = 0;
49 while ((pos = dst_str.find(sub_str)) != std::string::npos) { dst_str.replace(pos, sub_str.length(), new_str); }