mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-05 13:40:10 +00:00
added missing split_string to repo
This commit is contained in:
parent
998a74800c
commit
480916e4db
@ -566,4 +566,12 @@ EX void debug_view(string context, string s) {
|
|||||||
if(s != old) { old = s; println(hlog, 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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user