1 /* $Id: strspn.c 6118 2003-01-13 06:44:24Z rra $
3 ** This file has been modified to get it to compile more easily
4 ** on pre-4.4BSD systems. Rich $alz, June 1991.
12 * Copyright (c) 1989 The Regents of the University of California.
13 * All rights reserved.
15 * Redistribution and use in source and binary forms are permitted
16 * provided that: (1) source distributions retain this entire copyright
17 * notice and comment, and (2) distributions including binaries display
18 * the following acknowledgement: ``This product includes software
19 * developed by the University of California, Berkeley and its contributors''
20 * in the documentation or other materials provided with the distribution
21 * and in all advertising materials mentioning features or use of this
22 * software. Neither the name of the University nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
26 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
27 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
31 #if defined(LIBC_SCCS) && !defined(lint)
32 static char sccsid[] = "@(#)strspn.c 5.7 (Berkeley) 6/1/90";
33 #endif /* LIBC_SCCS and not lint */
40 * Span the string s2 (skip characters that are in s2).
47 const char *p = s1, *spanp;
51 * Skip any characters in s2, excluding the terminating \0.
55 for (spanp = s2; (sc = *spanp++) != 0;)