]> pd.if.org Git - pdclib/blob - functions/wchar/wcschr.c
dos2unix
[pdclib] / functions / wchar / wcschr.c
1 /* wcschr( const wchar_t *, wchar_t );
2
3    This file is part of the Public Domain C Library (PDCLib).
4    Permission is granted to use, modify, and / or redistribute at will.
5 */
6
7 #include <wchar.h>
8 #include <stddef.h>
9
10 #ifndef REGTEST
11
12 wchar_t *wcschr(const wchar_t * haystack, wchar_t needle)
13 {
14     while(*haystack) {
15         if(*haystack == needle) return (wchar_t*) haystack;
16         haystack++;
17     }
18     return NULL;
19 }
20
21
22 #endif
23
24 #ifdef TEST
25 #include "_PDCLIB_test.h"
26
27 int main( void )
28 {
29     return TEST_RESULTS;
30 }
31
32 #endif