xref: /original-bsd/lib/libc/string/strspn.3 (revision c3e32dec)
1.\" Copyright (c) 1990, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek and the American National Standards Committee X3,
6.\" on Information Processing Systems.
7.\"
8.\" %sccs.include.redist.man%
9.\"
10.\"     @(#)strspn.3	8.1 (Berkeley) 06/04/93
11.\"
12.Dd
13.Dt STRSPN 3
14.Os
15.Sh NAME
16.Nm strspn
17.Nd span a string
18.Sh SYNOPSIS
19.Fd #include <string.h>
20.Ft size_t
21.Fn strspn "const char *s" "const char *charset"
22.Sh DESCRIPTION
23The
24.Fn strcspn
25function
26spans the initial part of the null-terminated string
27.Fa s
28as long as the characters from
29.Fa s
30occur in string
31.Fa charset .
32.Sh RETURN VALUES
33The
34.Fn strspn
35function
36returns the number of characters spanned.
37.Sh SEE ALSO
38.Xr index 3 ,
39.Xr memchr 3 ,
40.Xr rindex 3 ,
41.Xr strchr 3 ,
42.Xr strcspn 3 ,
43.Xr strpbrk 3 ,
44.Xr strrchr 3 ,
45.Xr strsep 3 ,
46.Xr strstr 3 ,
47.Xr strtok 3
48.Sh STANDARDS
49The
50.Fn strspn
51function
52conforms to
53.St -ansiC .
54