Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/string bring in EXAMPLES from openbsd.



details:   https://anonhg.NetBSD.org/src/rev/f30ac7e917a8
branches:  trunk
changeset: 535147:f30ac7e917a8
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sun Aug 11 08:22:30 2002 +0000

description:
bring in EXAMPLES from openbsd.

diffstat:

 lib/libc/string/strrchr.3 |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r add335d0bb27 -r f30ac7e917a8 lib/libc/string/strrchr.3
--- a/lib/libc/string/strrchr.3 Sun Aug 11 07:53:06 2002 +0000
+++ b/lib/libc/string/strrchr.3 Sun Aug 11 08:22:30 2002 +0000
@@ -34,9 +34,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     from: @(#)strrchr.3    8.1 (Berkeley) 6/4/93
-.\"    $NetBSD: strrchr.3,v 1.6 2002/02/07 07:00:33 ross Exp $
+.\"    $NetBSD: strrchr.3,v 1.7 2002/08/11 08:22:30 yamt Exp $
 .\"
-.Dd June 4, 1993
+.Dd August 11, 2002
 .Dt STRRCHR 3
 .Os
 .Sh NAME
@@ -74,6 +74,18 @@
 .Fa c
 does not occur anywhere in
 .Fa s .
+.Sh EXAMPLES
+After the following call to
+.Fn strrchr ,
+.Va p
+will point to the string
+.Qq obar :
+.Bd -literal -offset indent
+char *p;
+char *s = "foobar";
+
+p = strrchr(s, 'o');
+.Ed
 .Sh SEE ALSO
 .Xr index 3 ,
 .Xr memchr 3 ,



Home | Main Index | Thread Index | Old Index