Files
RedBear-OS/tests/wchar/wcscspn.c
T
Red Bear OS 1b3e94a20d Red Bear OS relibc baseline
From release 0.1.0 pre-patched archive.
This includes all Red Bear modifications previously maintained
as patches in local/patches/relibc/.
2026-06-27 09:19:26 +03:00

17 lines
334 B
C

#include <assert.h>
#include <wchar.h>
int main(void) {
assert(wcscspn(L"", L"") == 0);
assert(wcscspn(L"", L"h") == 0);
assert(wcscspn(L"a", L"a") == 0);
assert(wcscspn(L"ba", L"ab") == 0);
assert(wcscspn(L"ba", L"a") == 1);
assert(wcscspn(L"abcdefghijkl$\"£$%", L"zxqrst,./$w") == 12);
return 0;
}