| 235 | } |
| 236 | |
| 237 | std::string StringGetAfter(const std::string& str, const std::string& key) { |
| 238 | if (key.empty()) { |
| 239 | return str; |
| 240 | } |
| 241 | std::size_t found = str.rfind(key); |
| 242 | if (found != std::string::npos) { |
| 243 | return str.substr(found + key.length(), |
| 244 | str.length() - (found + key.length())); |
| 245 | } |
| 246 | return ""; |
| 247 | } |
| 248 | |
| 249 | std::vector<std::string> StringSplit(const std::string& str, |
| 250 | const std::string& delim) { |