X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fwchar%2Fwcschr.c;fp=functions%2Fwchar%2Fwcschr.c;h=51d20a43f859e75d29f8c19fd6f687a8685cf427;hb=219271fd548949abce8bd75c34dd42e519418fc4;hp=0000000000000000000000000000000000000000;hpb=1cc4363093c919f79eafac209bb5c41548d3f88f;p=pdclib diff --git a/functions/wchar/wcschr.c b/functions/wchar/wcschr.c new file mode 100644 index 0000000..51d20a4 --- /dev/null +++ b/functions/wchar/wcschr.c @@ -0,0 +1,32 @@ +/* wcschr( const wchar_t *, wchar_t ); + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include +#include + +#ifndef REGTEST + +wchar_t *wcschr(const wchar_t * haystack, wchar_t needle) +{ + while(*haystack) { + if(*haystack == needle) return (wchar_t*) haystack; + haystack++; + } + return NULL; +} + + +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + return TEST_RESULTS; +} + +#endif