File:  [DVB] / dietlibc / lib / wcsstr.c
Revision 1.1: download - view: text, annotated - select for diffs
Mon Oct 8 14:23:59 2007 UTC (16 years, 8 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
add wcsstr

#include <wchar.h>

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;
}


LinuxTV legacy CVS <linuxtv.org/cvs>