From 47e68b48a085efbc0a71b7814659dba159314475 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 15 Jun 2026 00:52:40 +0100 Subject: Added type lookup to file selector. Removed old CVS tags. Added SDL keysym to char lookup. --- src/util.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index c16584c..b49b780 100644 --- a/src/util.c +++ b/src/util.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "util.h" @@ -138,4 +139,19 @@ void Debug(const char *format, ...) va_end(ap); } + +int StartsWith(const char *a, const char *b, size_t len) +{ + while(len && *a && *b && + tolower((unsigned char)*a) == tolower((unsigned char)*b)) + { + len--; + a++; + b++; + } + + return len == 0; +} + + /* END OF FILE */ -- cgit v1.3