diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-01-02 00:47:16 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-01-02 00:58:45 +0800 |
| commit | d8eaa13f2efc1eeca4e5f230d5a2d535aaf27338 (patch) | |
| tree | 6ca02e2a2d1b1121620431059e322724a3c94a33 /src/lib/string.cc | |
| parent | 2dde56422dcfb94affee2baffc8d240ad16ad4b2 (diff) | |
| download | lume-d8eaa13f2efc1eeca4e5f230d5a2d535aaf27338.tar.gz lume-d8eaa13f2efc1eeca4e5f230d5a2d535aaf27338.tar.xz | |
dev(file-system): establish VFS and Read-only FAT32 File System
Diffstat (limited to 'src/lib/string.cc')
| -rw-r--r-- | src/lib/string.cc | 13 |
1 files changed, 13 insertions, 0 deletions
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 |
