Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4973 right-hear 1
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
#include 
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
}