File:  [DVB] / dietlibc / lib / strcspn.c
Revision 1.3: download - view: text, annotated - select for diffs
Thu Sep 23 00:27:36 2010 UTC (13 years, 8 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
some cleanup

#include <sys/types.h>
#include <string.h>

size_t strcspn(const char *s, const char *reject)
{
  size_t l=0;
  int i;

  for (; *s; ++s) {
    for (i=0; reject[i]; ++i)
      if (*s==reject[i]) return l;
    ++l;
  }
  return l;
}

LinuxTV legacy CVS <linuxtv.org/cvs>