[Midnightbsd-cvs] src [10514] trunk/lib/libc/string/strspn.3: update refernces
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Jun 7 08:48:29 EDT 2018
Revision: 10514
http://svnweb.midnightbsd.org/src/?rev=10514
Author: laffer1
Date: 2018-06-07 08:48:28 -0400 (Thu, 07 Jun 2018)
Log Message:
-----------
update refernces
Modified Paths:
--------------
trunk/lib/libc/string/strspn.3
Property Changed:
----------------
trunk/lib/libc/string/strspn.3
Modified: trunk/lib/libc/string/strspn.3
===================================================================
--- trunk/lib/libc/string/strspn.3 2018-06-07 12:30:55 UTC (rev 10513)
+++ trunk/lib/libc/string/strspn.3 2018-06-07 12:48:28 UTC (rev 10514)
@@ -13,7 +13,7 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
-.\" 4. Neither the name of the University nor the names of its contributors
+.\" 3. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
@@ -30,13 +30,14 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)strspn.3 8.1 (Berkeley) 6/4/93
+.\" $FreeBSD: stable/10/lib/libc/string/strspn.3 281570 2015-04-16 00:24:21Z allanjude $
.\" $MidnightBSD$
-.\"
-.Dd June 4, 1993
+.Dd May 24, 2014
.Dt STRSPN 3
.Os
.Sh NAME
-.Nm strspn
+.Nm strspn ,
+.Nm strcspn
.Nd span a string
.Sh LIBRARY
.Lb libc
@@ -44,6 +45,8 @@
.In string.h
.Ft size_t
.Fn strspn "const char *s" "const char *charset"
+.Ft size_t
+.Fn strcspn "const char *s" "const char *charset"
.Sh DESCRIPTION
The
.Fn strspn
@@ -54,22 +57,44 @@
.Fa s
occur in the null-terminated string
.Fa charset .
-In other words, it computes the string array index in
-.Fa s
+In other words, it computes the string array index
of the first character of
.Fa s
which is not in
.Fa charset ,
else the index of the first null character.
+.Pp
+The
+.Fn strcspn
+function
+spans the initial part of the null-terminated string
+.Fa s
+as long as the characters from
+.Fa s
+.Sy do not
+occur in the null-terminated string
+.Fa charset
+.Po it spans the
+.Sy complement
+of
+.Fa charset
+.Pc .
+In other words, it computes the string array index
+of the first character of
+.Fa s
+which is also in
+.Fa charset ,
+else the index of the first null character.
.Sh RETURN VALUES
The
.Fn strspn
-function
-returns the number of characters spanned.
+and
+.Fn strcspn
+functions
+return the number of characters spanned.
.Sh SEE ALSO
.Xr memchr 3 ,
.Xr strchr 3 ,
-.Xr strcspn 3 ,
.Xr strpbrk 3 ,
.Xr strrchr 3 ,
.Xr strsep 3 ,
@@ -79,6 +104,8 @@
.Sh STANDARDS
The
.Fn strspn
-function
-conforms to
+and
+.Fn strcspn
+functions
+conform to
.St -isoC .
Property changes on: trunk/lib/libc/string/strspn.3
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list