aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/stringop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/stringop.c b/common/stringop.c
index 16d04917..dcbd1656 100644
--- a/common/stringop.c
+++ b/common/stringop.c
@@ -360,3 +360,7 @@ char *format_str(const char *fmt, ...) {
va_end(args);
return str;
}
+
+bool has_prefix(const char *str, const char *prefix) {
+ return strncmp(str, prefix, strlen(prefix)) == 0;
+}