summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util.c b/util.c
index 50f79ee..88a6d4f 100644
--- a/util.c
+++ b/util.c
@@ -189,6 +189,11 @@ char * split_keyval(char * text)
return text+1;
}
+uint8_t startswith(const char *haystack, const char *prefix)
+{
+ return !strncmp(haystack, prefix, strlen(prefix));
+}
+
void bin_to_hex(uint8_t *output, uint8_t *input, uint64_t size)
{
while (size)