diff --git a/util.cpp b/util.cpp index 2f160eb1..2b1c666c 100644 --- a/util.cpp +++ b/util.cpp @@ -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>& v) { int N = isize(v); for(int k=0; k