2022-05-26 21:52:01 +00:00
|
|
|
module;
|
2022-05-26 18:04:35 +00:00
|
|
|
|
2022-05-26 21:52:01 +00:00
|
|
|
import <string>;
|
|
|
|
import <vector>;
|
2022-05-26 18:04:35 +00:00
|
|
|
|
2022-05-26 21:52:01 +00:00
|
|
|
module shadow_utils;
|
2022-05-26 18:04:35 +00:00
|
|
|
|
|
|
|
inline std::vector<std::string> explode(const std::string& s, const char& c)
|
|
|
|
{
|
|
|
|
std::string buff;
|
|
|
|
std::vector<std::string> v;
|
|
|
|
|
|
|
|
for (auto n : s)
|
|
|
|
{
|
|
|
|
if (n != c) buff += n; else
|
|
|
|
if (n == c && buff != "") { v.push_back(buff); buff = ""; }
|
|
|
|
}
|
|
|
|
if (buff != "") v.push_back(buff);
|
|
|
|
|
|
|
|
return v;
|
|
|
|
}
|