From d8eaa13f2efc1eeca4e5f230d5a2d535aaf27338 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 2 Jan 2026 00:47:16 +0800 Subject: dev(file-system): establish VFS and Read-only FAT32 File System --- src/lib/string.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/lib') diff --git a/src/lib/string.cc b/src/lib/string.cc index bbd079d..a302fc6 100644 --- a/src/lib/string.cc +++ b/src/lib/string.cc @@ -69,3 +69,16 @@ int strcmp(const char *s1, const char *s2) } return *(const unsigned char *)s1 - *(const unsigned char *)s2; } + +int strcasecmp(const char *s1, const char *s2) +{ + while (*s1) + { + if(*s1 == *s2 || *s1 + 32 == *s2 || *s1 == *s2 + 32){ + s1++; + s2++; + } + else break; + } + return *(const unsigned char *)s1 - *(const unsigned char *)s2; +} \ No newline at end of file -- cgit v1.2.3