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

14 lines
370 B
C

#include <assert.h>
#include <wchar.h>
int main(void) {
wchar_t *haystack = L"Hello World!";
assert(wcschr(haystack, L'H') == haystack);
assert(wcschr(haystack, L'W') == &haystack[6]);
assert(wcschr(haystack, L'\0') == &haystack[12]); // the terminating nul is considered part of the string
assert(wcschr(haystack, L'X') == NULL);
return 0;
}