| 129 | } |
| 130 | |
| 131 | std::string trim(const std::string& s, const std::string& t) |
| 132 | { |
| 133 | const std::string::size_type beg = s.find_first_not_of(t); |
| 134 | if (beg == std::string::npos) |
| 135 | return ""; |
| 136 | const std::string::size_type end = s.find_last_not_of(t); |
| 137 | return s.substr(beg, end - beg + 1); |
| 138 | } |
| 139 | |
| 140 | void findAndReplace(std::string &source, const std::string &searchFor, const std::string &replaceWith) |
| 141 | { |
no outgoing calls