.\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Chris Torek and the American National Standards Committee X3, .\" on Information Processing Systems. .\" .\" %sccs.include.redist.man% .\" .\" @(#)strspn.3 5.4 (Berkeley) 08/05/91 .\" .Dd .Dt STRSPN 3 .Os .Sh NAME .Nm strspn .Nd span a string .Sh SYNOPSIS .Fd #include .Ft size_t .Fn strspn "const char *s" "const char *charset" .Sh DESCRIPTION The .Fn strcspn function spans the initial part of the null-terminated string .Fa s as long as the characters from .Fa s occur in string .Fa charset . .Sh RETURN VALUES The .Fn strspn function returns the number of characters spanned. .Sh SEE ALSO .Xr index 3 , .Xr memchr 3 , .Xr rindex 3 , .Xr strchr 3 , .Xr strcspn 3 , .Xr strpbrk 3 , .Xr strrchr 3 , .Xr strsep 3 , .Xr strstr 3 , .Xr strtok 3 .Sh STANDARDS The .Fn strspn function conforms to .St -ansiC .