libluna: Add wcscmp
This commit is contained in:
parent
15dcd6ad15
commit
c5a867d81c
@ -20,6 +20,7 @@ extern "C"
|
||||
char* strtok(char* str, const char* delim);
|
||||
|
||||
usize wcslen(const wchar_t* str);
|
||||
int wcscmp(const wchar_t* a, const wchar_t* b);
|
||||
|
||||
char* strdup(const char* str);
|
||||
char* strndup(const char* str, usize max);
|
||||
|
@ -64,6 +64,16 @@ extern "C"
|
||||
return *(const u8*)a - *(const u8*)b;
|
||||
}
|
||||
|
||||
int wcscmp(const wchar_t* a, const wchar_t* b)
|
||||
{
|
||||
while (*a && (*a == *b))
|
||||
{
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
return *(const u8*)a - *(const u8*)b;
|
||||
}
|
||||
|
||||
int strncmp(const char* a, const char* b, usize max)
|
||||
{
|
||||
const char* s = a;
|
||||
|
Loading…
Reference in New Issue
Block a user