Add wcslen()
I think this can go in CString.h, no need to create a separate CWChar.h or something
This commit is contained in:
parent
36179155e1
commit
9c1c6bb320
@ -9,5 +9,7 @@ extern "C"
|
||||
void* memmove(void* dest, const void* src, usize n);
|
||||
usize strlen(const char* str);
|
||||
|
||||
usize wcslen(const wchar_t* str);
|
||||
|
||||
char* strdup(const char* str);
|
||||
}
|
@ -46,6 +46,14 @@ extern "C"
|
||||
return (usize)(i - str);
|
||||
}
|
||||
|
||||
usize wcslen(const wchar_t* str)
|
||||
{
|
||||
const wchar_t* i = str;
|
||||
for (; *i; ++i)
|
||||
;
|
||||
return (usize)(i - str);
|
||||
}
|
||||
|
||||
char* strdup(const char* str)
|
||||
{
|
||||
const usize len = strlen(str);
|
||||
|
Loading…
Reference in New Issue
Block a user