1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:17:35 +00:00

LibC: Implement mbrlen

This commit is contained in:
Tim Schumacher 2021-10-21 23:45:10 +02:00 committed by Brian Gianforcaro
parent 259ef76504
commit e618602433
2 changed files with 42 additions and 3 deletions

View file

@ -300,10 +300,14 @@ size_t mbrtowc(wchar_t* pwc, const char* s, size_t n, mbstate_t* state)
return consumed_bytes;
}
size_t mbrlen(const char*, size_t, mbstate_t*)
size_t mbrlen(const char* s, size_t n, mbstate_t* ps)
{
dbgln("FIXME: Implement mbrlen()");
TODO();
static mbstate_t anonymous_state = {};
if (ps == nullptr)
ps = &anonymous_state;
return mbrtowc(nullptr, s, n, ps);
}
size_t wcrtomb(char* s, wchar_t wc, mbstate_t*)