| 146 | } |
| 147 | |
| 148 | void StripString(std::string *s) { |
| 149 | if (s->empty()) { |
| 150 | return; |
| 151 | } |
| 152 | std::string whitespaces(" \t\f\v\n\r"); |
| 153 | s->erase(0, s->find_first_not_of(whitespaces)); |
| 154 | s->erase(s->find_last_not_of(whitespaces) + 1); |
| 155 | } |
| 156 | |
| 157 | std::string GetStrAfterPattern(const std::string &str, |
| 158 | const std::string &pattern) { |