Package: manpages-dev Version: 2.28-1 Severity: wishlist Find attached a patch to document strchrnul.3; please consider including it.
--- - 2006-05-17 23:22:33.816543000 -0400 +++ /home/pryzbyj/man/strchr.3 2006-05-17 23:21:31.000000000 -0400 @@ -25,19 +25,24 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Mon Apr 12 12:51:24 1993, David Metcalfe -.TH STRCHR 3 1993-04-12 "" "Linux Programmer's Manual" +.\" Modified Wed May 17 23:00:50 2006, Justin Pryzby +.\" <[EMAIL PROTECTED]> +.TH STRCHR 3 1993-04-12 "GNU" "Linux Programmer's Manual" .SH NAME -strchr, strrchr \- locate character in string +strchr, strrchr, strchrnul \- locate character in string .SH SYNOPSIS .nf .B #include <string.h> .sp .BI "char *strchr(const char *" s ", int " c ); -.sp .BI "char *strrchr(const char *" s ", int " c ); +.sp +.B #define _GNU_SOURCE +.BI "char *strchrnul(const char *" s ", int " c ); .fi .SH DESCRIPTION -The \fBstrchr\fP() function returns a pointer to the first occurrence +The \fBstrchr\fP() and \fPstrchrnul\fP() functions return pointers to +the first occurrence of the character \fIc\fP in the string \fIs\fP. .PP The \fBstrrchr\fP() function returns a pointer to the last occurrence @@ -48,8 +53,14 @@ .SH "RETURN VALUE" The \fBstrchr\fP() and \fBstrrchr\fP() functions return a pointer to the matched character or NULL if the character is not found. +\fBstrchr\fP() returns a pointer to the given character, or a pointer +to the null character at the end of the string if it is not found +(that is, \fIs\fB+strlen(\fPs\fP)\fR). .SH "CONFORMING TO" SVID 3, POSIX, 4.3BSD, ISO 9899 + +\fBstrchr\fP() is specific to glibc, and should not be used in +programs intended to be portable. .SH "SEE ALSO" .BR index (3), .BR memchr (3), @@ -58,6 +69,7 @@ .BR strsep (3), .BR strspn (3), .BR strstr (3), +.BR strlen (3), .BR strtok (3), .BR wcschr (3), .BR wcsrchr (3) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]