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