source:
trunk/sys/dietlibc/wcsstr.c
@
251
Last change on this file since 251 was 1, checked in by , 8 years ago | |
---|---|
File size: 247 bytes |
Line | |
---|---|
1 | #include <wchar.h> |
2 | |
3 | wchar_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.