diff --git a/luna/include/luna/CString.h b/luna/include/luna/CString.h index 0eca451c..b1026be3 100644 --- a/luna/include/luna/CString.h +++ b/luna/include/luna/CString.h @@ -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); } \ No newline at end of file diff --git a/luna/src/CString.cpp b/luna/src/CString.cpp index 7942501a..79580e6f 100644 --- a/luna/src/CString.cpp +++ b/luna/src/CString.cpp @@ -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);