| 185 | } |
| 186 | |
| 187 | auto string::split(std::string& str, char delimiter) -> std::vector<std::string> |
| 188 | { |
| 189 | auto tokens = std::vector<std::string>{}; |
| 190 | auto ss = std::stringstream{ str }; |
| 191 | auto tok = std::string{}; |
| 192 | |
| 193 | while (std::getline(ss, tok, delimiter)) |
| 194 | { |
| 195 | tokens.push_back(tok); |
| 196 | } |
| 197 | |
| 198 | return tokens; |
| 199 | } |
| 200 | |
| 201 | auto string::clean_buffer_lines(std::vector<u8>& buffer) -> std::vector<std::string> |
| 202 | { |