libc: Add strcoll()

No locale support, this just calls strcmp()
This commit is contained in:
apio 2022-10-22 21:00:59 +02:00
parent 6d4d2579ab
commit 433b307cb2
2 changed files with 8 additions and 0 deletions

View File

@ -71,6 +71,9 @@ extern "C"
/* Compares at most max bytes of the strings a and b. */
int strncmp(const char* a, const char* b, size_t max);
/* Compares a and b based on the current locale. */
int strcoll(const char* a, const char* b);
/* Searches for the needle string in the haystack string. */
char* strstr(const char* haystack, const char* needle);

View File

@ -131,6 +131,11 @@ extern "C"
return *(const unsigned char*)a - *(const unsigned char*)b;
}
int strcoll(const char* a, const char* b)
{
return strcmp(a, b);
}
size_t strcspn(const char* str, const char* reject)
{
const char* s = str;