summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.c b/util.c
index 26a8d8e..06606e3 100644
--- a/util.c
+++ b/util.c
@@ -42,3 +42,7 @@ static char32_t const *util_mem32chr_const(char32_t const *s, char32_t c, size_t
static bool streq(char const *a, char const *b) {
return strcmp(a, b) == 0;
}
+
+static bool util_is_prefix(char const *str, char const *prefix) {
+ return strncmp(str, prefix, strlen(prefix)) == 0;
+}