Files
RedBear-OS/tests/wchar/wcstok.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

15 lines
414 B
C

#include <stdio.h>
#include <wchar.h>
int main() {
wchar_t wcs[] = L"Hello from the otter\tslide.\nMust have gone down a\t\t\t \n thousand tiiiiiimeeeees...\n\n\n";
wchar_t *token;
wchar_t *state;
for (token = wcstok(wcs, L" \t\n", &state);
token != NULL;
token = wcstok(NULL, L" \t\n", &state)) {
fputws(token, stdout);
fputwc(L'\n', stdout);
}
}