1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-19 11:44:48 +00:00

added missing split_string to repo

This commit is contained in:
Zeno Rogue 2024-05-26 23:19:19 +02:00
parent 998a74800c
commit 480916e4db

View File

@ -566,4 +566,12 @@ EX void debug_view(string context, string s) {
if(s != old) { old = s; println(hlog, s); }
}
EX vector<string> split_string(const string& s, char sep) {
vector<string> res;
string next = "";
for(char c: s) if(c == sep) { res.push_back(next); next = ""; } else next += c;
res.push_back(next);
return res;
}
}