Commit ef64d105 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

util: Add 'strstart()'.

parent b6a38ce5
......@@ -69,4 +69,13 @@ static inline bool streq(char const *const a, char const *const b)
return strcmp(a, b) == 0;
static inline char const* strstart(char const* str, char const* start)
do {
if (*start == '\0')
return str;
} while (*str++ == *start++);
return NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment