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

LibC: Implement wcspbrk

This commit is contained in:
Tim Schumacher 2021-09-22 08:52:27 +00:00 committed by Brian Gianforcaro
parent c80b65b827
commit 1b078f87b7
3 changed files with 39 additions and 0 deletions

View file

@ -344,4 +344,15 @@ int mbsinit(const mbstate_t* state)
return 1;
}
wchar_t* wcspbrk(const wchar_t* wcs, const wchar_t* accept)
{
for (const wchar_t* cur = accept; *cur; cur++) {
wchar_t* res = wcschr(wcs, *cur);
if (res)
return res;
}
return nullptr;
}
}

View file

@ -41,5 +41,6 @@ size_t wcrtomb(char*, wchar_t, mbstate_t*);
int wcscoll(const wchar_t*, const wchar_t*);
int wctob(wint_t);
int mbsinit(const mbstate_t*);
wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
__END_DECLS