5 #ifndef __pinocchio_utils_string_hpp__
6 #define __pinocchio_utils_string_hpp__
22 inline bool replace(std::string & input_str,
const std::string & from,
const std::string & to)
24 bool has_from =
false;
25 size_t start_pos = input_str.find(from);
27 while (start_pos != std::string::npos)
30 input_str.replace(start_pos, from.length(), to);
31 start_pos = input_str.find(from);
Main pinocchio namespace.
bool replace(std::string &input_str, const std::string &from, const std::string &to)
Replace string from with to in input_str.