Files
static-site-generator/src/format/format.cpp

12 lines
325 B
C++

#include "markdown/markdown.hpp"
#include <string>
static bool replace_once(std::string &str, const std::string &from,
const std::string &to) {
size_t start_pos = str.find(from);
if (start_pos == std::string::npos)
return false;
str.replace(start_pos, from.length(), to);
return true;
}