2024-12-18 19:26:28 +00:00
|
|
|
//
|
|
|
|
// Created by hamac on 18.12.2024.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <sstream>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class Utils {
|
2024-12-18 22:12:48 +00:00
|
|
|
public:
|
|
|
|
static std::vector<std::string> split(const std::string &s, char delim) {
|
|
|
|
std::vector<std::string> elems;
|
|
|
|
std::stringstream ss(s);
|
|
|
|
std::string item;
|
|
|
|
while (std::getline(ss, item, delim)) {
|
|
|
|
elems.push_back(item);
|
|
|
|
}
|
|
|
|
return elems;
|
2024-12-18 19:26:28 +00:00
|
|
|
}
|
2024-12-18 22:12:48 +00:00
|
|
|
};
|