Files
dm-cli/dm-cli/Replace.cpp
2025-11-11 17:58:02 +03:00

18 lines
425 B
C++

#include <string>
#include "common.hpp"
#include <iostream>
std::string Replace(std::string source, std::string from, std::string out) {
std::string res("");
size_t start = 0, stop = 0;
start = source.find(from);
stop = from.length();
if (start >= 0 ) res = source.replace(start, stop, out);
return res;
}
int NoResponse(std::string mgs)
{
std::cout << "No response from the server." + mgs << std::endl;
return 1;
}