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