source: trunk/sys/dietlibc/wcsstr.c @ 204

Last change on this file since 204 was 1, checked in by alain, 8 years ago

First import

File size: 247 bytes
Line 
1#include <wchar.h>
2
3wchar_t *wcsstr(const wchar_t *haystack, const wchar_t *needle) {
4  size_t i,j;
5  for (i=0; haystack[i]; ++i) {
6    for (j=0; haystack[i+j]==needle[j]; ++j) ;
7    if (!needle[j]) return (wchar_t*)haystack+i;
8  }
9  return 0;
10}
11
Note: See TracBrowser for help on using the repository browser.