xref: /original-bsd/lib/libc/string/strcspn.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.\"     @(#)strcspn.3	5.2 (Berkeley) 04/19/91
9.\"
10.Dd
11.Dt STRCSPN 3
12.Os
13.Sh NAME
14.Nm strcspn
15.Nd span the complement of a string
16.Sh SYNOPSIS
17.Fd #include <string.h>
18.Ft size_t
19.Fn strcspn "const char *s" "const char *charset"
20.Sh DESCRIPTION
21The
22.Fn strcspn
23function
24spans the initial part of the null-terminated string
25.Fa s
26as long as the characters from
27.Fa s
28do not occur in string
29.Fa charset
30(it
31spans the
32.Em complement
33of
34.Fa charset ) .
35.Sh RETURN VALUES
36The
37.Fn strcspn
38function
39returns the number of characters spanned.
40.Sh SEE ALSO
41.Xr index 3 ,
42.Xr memchr 3 ,
43.Xr rindex 3 ,
44.Xr strchr 3 ,
45.Xr strpbrk 3 ,
46.Xr strrchr 3 ,
47.Xr strsep 3 ,
48.Xr strspn 3 ,
49.Xr strstr 3 ,
50.Xr strtok 3
51.Sh STANDARDS
52The
53.Fn strcspn
54function
55conforms to
56.St -ansiC .
57