1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 06:27:17 +00:00

added starts_with

This commit is contained in:
Zeno Rogue 2024-11-18 17:58:14 +01:00
parent 0137175d46
commit 410b33edd2

View File

@ -1079,6 +1079,11 @@ EX string eval_programmable_string(const string& fmt) {
} }
} }
EX bool starts_with(const char *c, const char *token) {
while(*token && *c == *token) c++, token++;
return !*token;
}
EX void floyd_warshall(vector<vector<char>>& v) { EX void floyd_warshall(vector<vector<char>>& v) {
int N = isize(v); int N = isize(v);
for(int k=0; k<N; k++) for(int k=0; k<N; k++)