:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / lib / msvcrt / string / strcspn.c
1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2 #include <msvcrt/string.h>
3
4 size_t strcspn(const char *s1, const char *s2)
5 {
6   const char *p, *spanp;
7   char c, sc;
8
9   for (p = s1;;)
10   {
11     c = *p++;
12     spanp = s2;
13     do {
14       if ((sc = *spanp++) == c)
15         return p - 1 - s1;
16     } while (sc != 0);
17   }
18   /* NOTREACHED */
19 }