From e2281e5a19682d44435b1015c4ce4a64b7e3b586 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Mon, 11 Mar 2019 00:04:48 -0700 Subject: Minor cleanup --- util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index 34144b5..1b4c600 100644 --- a/util.h +++ b/util.h @@ -32,6 +32,8 @@ long file_size(FILE * f); char * strip_ws(char * text); //Inserts a null after the first word, returns a pointer to the second word char * split_keyval(char * text); +//Checks if haystack starts with prefix +uint8_t startswith(const char *haystack, const char *prefix); //Takes a binary byte buffer and produces a lowercase hex string void bin_to_hex(uint8_t *output, uint8_t *input, uint64_t size); //Takes an (optionally) null-terminated UTF16-BE string and converts a maximum of max_size code-units to UTF-8 -- cgit v1.2.3