mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-05 20:39:16 +00:00
userspace/libc: implement strcoll()
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -72,7 +72,17 @@ export int strcmp(const char *s1, const char *s2)
|
||||
return *(unsigned char *)s1 - *(unsigned char *)s2;
|
||||
}
|
||||
|
||||
export int strcoll(const char *, const char *);
|
||||
export int strcoll(const char *s1, const char *s2)
|
||||
{
|
||||
while (*s1 && (*s1 == *s2))
|
||||
{
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
|
||||
return *(unsigned char *)s1 - *(unsigned char *)s2;
|
||||
}
|
||||
|
||||
export int strcoll_l(const char *, const char *, locale_t);
|
||||
export char *strcpy(char *restrict, const char *restrict);
|
||||
|
||||
|
Reference in New Issue
Block a user