1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-01 15:30:40 +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;
}
}