bool File::replaceFileIn (const File& newFile) const { if (newFile.fullPath == fullPath) return true; if (! newFile.exists()) return moveFileTo (newFile); if (! replaceInternal (newFile)) return false; deleteFile(); return true; }
std::string replaceAllWords(const std::string &input, const std::string &from, const std::string &to) { return replaceInternal(input, from.c_str(), to.c_str(), true); }
std::string replaceAllWords(const std::string &input, const char *from, const char *to) { return replaceInternal(input, from, to, true); }
std::string replaceAll(const std::string &input, const char *from, const char *to) { return replaceInternal(input, from, to, false); }