OSDN Git Service

(split) LDP: Update original to LDP v3.40.
[linuxjm/LDP_man-pages.git] / original / man3 / strchr.3
index b2ecfef..97fd42d 100644 (file)
@@ -28,7 +28,7 @@
 .\" 2006-05-19, Justin Pryzby <pryzbyj@justinpryzby.com>
 .\"    Document strchrnul(3).
 .\"
-.TH STRCHR 3  2010-09-20 "GNU" "Linux Programmer's Manual"
+.TH STRCHR 3  2012-04-24 "GNU" "Linux Programmer's Manual"
 .SH NAME
 strchr, strrchr, strchrnul \- locate character in string
 .SH SYNOPSIS
@@ -48,20 +48,31 @@ strchr, strrchr, strchrnul \- locate character in string
 The
 .BR strchr ()
 function returns a pointer to the first occurrence
-of the character \fIc\fP in the string \fIs\fP.
+of the character
+.I c
+in the string
+.IR s .
 .PP
 The
 .BR strrchr ()
 function returns a pointer to the last occurrence
-of the character \fIc\fP in the string \fIs\fP.
+of the character
+.I c
+in the string
+.IR s .
 .PP
 The
 .BR strchrnul ()
 function is like
 .BR strchr ()
-except that if \fIc\fP is not found in \fIs\fP,
+except that if
+.I c
+is not found in
+.IR s ,
 then it returns a pointer to the null byte
-at the end of \fIs\fP, rather than NULL.
+at the end of
+.IR s ,
+rather than NULL.
 .PP
 Here "character" means "byte"; these functions do not work with
 wide or multibyte characters.
@@ -72,6 +83,11 @@ and
 .BR strrchr ()
 functions return a pointer to
 the matched character or NULL if the character is not found.
+The terminating null byte is considered part of the string,
+so that if
+.I c
+is specified as \(aq\\0\(aq,
+these functions return a pointer to the terminator.
 
 The
 .BR strchrnul ()