Mercurial > repos > blastem
diff util.h @ 1787:0c6d07f91346 mame_interp
Merge from default
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 14 Mar 2019 23:40:50 -0700 |
parents | eda8df5bc74c |
children | 52a47611a273 |
line wrap: on
line diff
--- a/util.h Wed Mar 13 22:01:22 2019 -0700 +++ b/util.h Thu Mar 14 23:40:50 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