diff options
| author | Ian C <ianc@noddybox.co.uk> | 2026-06-15 00:52:40 +0100 |
|---|---|---|
| committer | Ian C <ianc@noddybox.co.uk> | 2026-06-15 00:52:40 +0100 |
| commit | 47e68b48a085efbc0a71b7814659dba159314475 (patch) | |
| tree | 0c7ad1ee36bdf3d35ce48b959821e677f702a4c4 /src/util.c | |
| parent | f540fb7da37d6c5b5544715e4ee6b83d440ea61d (diff) | |
Added type lookup to file selector. Removed old CVS tags. Added SDL keysym to char lookup.
Diffstat (limited to 'src/util.c')
| -rw-r--r-- | src/util.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -26,6 +26,7 @@ #include <stdio.h> #include <string.h> #include <stdarg.h> +#include <ctype.h> #include <sys/param.h> #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 */ |
