[Midnightbsd-cvs] src [10522] trunk/lib/libc/string/strchr.3: tag

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Jun 7 18:32:47 EDT 2018


Revision: 10522
          http://svnweb.midnightbsd.org/src/?rev=10522
Author:   laffer1
Date:     2018-06-07 18:32:47 -0400 (Thu, 07 Jun 2018)
Log Message:
-----------
tag

Modified Paths:
--------------
    trunk/lib/libc/string/strchr.3

Property Changed:
----------------
    trunk/lib/libc/string/strchr.3

Modified: trunk/lib/libc/string/strchr.3
===================================================================
--- trunk/lib/libc/string/strchr.3	2018-06-07 22:32:13 UTC (rev 10521)
+++ trunk/lib/libc/string/strchr.3	2018-06-07 22:32:47 UTC (rev 10522)
@@ -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.
 .\"
 .\"     @(#)strchr.3	8.2 (Berkeley) 4/19/94
+.\" $FreeBSD: stable/10/lib/libc/string/strchr.3 251069 2013-05-28 20:57:40Z emaste $
 .\" $MidnightBSD$
 .\"
-.Dd April 19, 1994
+.Dd February 13, 2013
 .Dt STRCHR 3
 .Os
 .Sh NAME
-.Nm strchr , strrchr
+.Nm strchr , strrchr , strchrnul
 .Nd locate character in string
 .Sh LIBRARY
 .Lb libc
@@ -46,6 +47,8 @@
 .Fn strchr "const char *s" "int c"
 .Ft "char *"
 .Fn strrchr "const char *s" "int c"
+.Ft "char *"
+.Fn strchrnul "const char *s" "int c"
 .Sh DESCRIPTION
 The
 .Fn strchr
@@ -69,6 +72,18 @@
 .Fn strchr
 except it locates the last occurrence of
 .Fa c .
+.Pp
+The
+.Fn strchrnul
+function is identical to
+.Fn strchr
+except that if
+.Fa c
+is not found in
+.Fa s
+a pointer to the terminating
+.Ql \e0
+is returned.
 .Sh RETURN VALUES
 The functions
 .Fn strchr
@@ -77,6 +92,11 @@
 return a pointer to the located character, or
 .Dv NULL
 if the character does not appear in the string.
+.Pp
+.Fn strchrnul
+returns a pointer to the terminating
+.Ql \e0
+if the character does not appear in the string.
 .Sh SEE ALSO
 .Xr memchr 3 ,
 .Xr memmem 3 ,
@@ -94,3 +114,11 @@
 .Fn strrchr
 conform to
 .St -isoC .
+The
+.Fn strchrnul
+is a GNU extension .
+.Sh History
+The
+.Fn strchrnul
+function first appeared in glibc 2.1.1 and was added in
+.Fx 10.0 .


Property changes on: trunk/lib/libc/string/strchr.3
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list