summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libc/string/strcspn.316
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/libc/string/strcspn.3 b/src/lib/libc/string/strcspn.3
index 93c6d8f84c..de6aff5ebd 100644
--- a/src/lib/libc/string/strcspn.3
+++ b/src/lib/libc/string/strcspn.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: strcspn.3,v 1.2 1996/08/19 08:34:14 tholo Exp $ 36.\" $OpenBSD: strcspn.3,v 1.3 1999/06/04 16:39:27 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRCSPN 3 39.Dt STRCSPN 3
@@ -65,6 +65,20 @@ The
65.Fn strcspn 65.Fn strcspn
66function 66function
67returns the number of characters spanned. 67returns the number of characters spanned.
68.Sh EXAMPLES
69The following call to
70.Fn strcspn
71will return 3, since the first three characters of string
72.Fa s
73do not occur in string
74.Fa charset :
75.Bd -literal -offset indent
76char *s = "foobar";
77char *charset = "bar";
78size_t span;
79
80span = strcspn(s, charset);
81.Ed
68.Sh SEE ALSO 82.Sh SEE ALSO
69.Xr index 3 , 83.Xr index 3 ,
70.Xr memchr 3 , 84.Xr memchr 3 ,