diff util.h @ 1783:eda8df5bc74c

Minor cleanup
author Michael Pavone <pavone@retrodev.com>
date Mon, 11 Mar 2019 00:04:48 -0700
parents 7121daaa48c2
children 52a47611a273
line wrap: on
line diff
--- a/util.h	Sun Mar 10 23:10:43 2019 -0700
+++ b/util.h	Mon Mar 11 00:04:48 2019 -0700
@@ -32,6 +32,8 @@
 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