started rewriting setbyfen + utils
This commit is contained in:
1 parent
547e1f9172
commit
69a7855f96
6 files changed
+55
-156
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <sstream>
|
||||
|
||||
std::vector<std::string> split(std::string_view str, char delim) {
|
||||
std::vector<std::string> results;
|
||||
|
||||
std::istringstream stream(std::string{str});
|
||||
|
||||
for (std::string token{}; std::getline(stream, token, delim);) {
|
||||
if (token.empty()) continue;
|
||||
|
||||
results.push_back(token);
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
Reference in new issue
Block a user