projects
/
andemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
screen-relative events
[andemo]
/
src
/
util.c
diff --git
a/src/util.c
b/src/util.c
index
dc86d10
..
7be1859
100644
(file)
--- a/
src/util.c
+++ b/
src/util.c
@@
-41,3
+41,14
@@
char *strdup_nf_impl(const char *s, const char *file, int line)
}
return res;
}
+
+
+int match_prefix(const char *str, const char *prefix)
+{
+ while(*str && *prefix) {
+ if(*str++ != *prefix++) {
+ return 0;
+ }
+ }
+ return *prefix ? 0 : 1;
+}