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 and the American National Standards Committee X3, 6.\" on Information Processing Systems. 7.\" 8.\" %sccs.include.redist.man% 9.\" 10.\" @(#)strcspn.3 5.3 (Berkeley) 06/29/91 11.\" 12.Dd 13.Dt STRCSPN 3 14.Os 15.Sh NAME 16.Nm strcspn 17.Nd span the complement of a string 18.Sh SYNOPSIS 19.Fd #include <string.h> 20.Ft size_t 21.Fn strcspn "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 30do not occur in string 31.Fa charset 32(it 33spans the 34.Em complement 35of 36.Fa charset ) . 37.Sh RETURN VALUES 38The 39.Fn strcspn 40function 41returns the number of characters spanned. 42.Sh SEE ALSO 43.Xr index 3 , 44.Xr memchr 3 , 45.Xr rindex 3 , 46.Xr strchr 3 , 47.Xr strpbrk 3 , 48.Xr strrchr 3 , 49.Xr strsep 3 , 50.Xr strspn 3 , 51.Xr strstr 3 , 52.Xr strtok 3 53.Sh STANDARDS 54The 55.Fn strcspn 56function 57conforms to 58.St -ansiC . 59