Skip to content

Commit

Permalink
added starts_with
Browse files Browse the repository at this point in the history
  • Loading branch information
zenorogue committed Nov 18, 2024
1 parent 0137175 commit 410b33e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
int N = isize(v);
for(int k=0; k<N; k++)
Expand Down

0 comments on commit 410b33e

Please sign in to comment.