scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

wmemchr.c (183B)


      1 #include <wchar.h>
      2 
      3 wchar_t *
      4 wmemchr(const wchar_t *s, wchar_t c, size_t n)
      5 {
      6 	wchar_t *bp = (wchar_t *) s;
      7 
      8 	for ( ; n > 0 && *bp != c; n--)
      9 		++bp;
     10 	return (n == 0) ? NULL : bp;
     11 }