1b3e94a20d
From release 0.1.0 pre-patched archive. This includes all Red Bear modifications previously maintained as patches in local/patches/relibc/.
14 lines
370 B
C
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;
|
|
}
|