| 34 | { |
| 35 | |
| 36 | inline std::vector<std::string> split_string(const std::string &str, const char del) |
| 37 | { |
| 38 | std::vector<std::string> splitted_strs; |
| 39 | std::stringstream ss(str); |
| 40 | std::string item; |
| 41 | while (std::getline(ss, item, del)) |
| 42 | { |
| 43 | if (!item.empty()) |
| 44 | { |
| 45 | splitted_strs.push_back(item); |
| 46 | } |
| 47 | } |
| 48 | return splitted_strs; |
| 49 | } |
| 50 | |
| 51 | inline bool string_startswith(const std::string &str, const std::string &qry) |
| 52 | { |