#include wchar_t *wcsstr(const wchar_t *haystack, const wchar_t *needle) { size_t i,j; for (i=0; haystack[i]; ++i) { for (j=0; haystack[i+j]==needle[j]; ++j) ; if (!needle[j]) return (wchar_t*)haystack+i; } return 0; }