12 #ifndef MLPACK_BINDINGS_MARKDOWN_REPLACE_ALL_COPY_HPP 13 #define MLPACK_BINDINGS_MARKDOWN_REPLACE_ALL_COPY_HPP 19 const std::string& from,
20 const std::string& to)
22 std::string strCopy = str;
24 while ((startPos = strCopy.find(from, startPos)) != std::string::npos)
26 strCopy.replace(startPos, from.length(), to);
27 startPos += to.length();
The core includes that mlpack expects; standard C++ includes, Armadillo, cereal, and a few basic mlpa...
std::string ReplaceAllCopy(const std::string &str, const std::string &from, const std::string &to)