xref: /csrg-svn/lib/libc/string/rindex.3 (revision 48350)
1*48350Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California.
241963Sbostic.\" All rights reserved.
341963Sbostic.\"
441963Sbostic.\" This code is derived from software contributed to Berkeley by
541963Sbostic.\" Chris Torek.
641963Sbostic.\" %sccs.include.redist.man%
741963Sbostic.\"
8*48350Scael.\"     @(#)rindex.3	5.2 (Berkeley) 04/19/91
941963Sbostic.\"
10*48350Scael.Dd
11*48350Scael.Dt RINDEX 3
12*48350Scael.Os
13*48350Scael.Sh NAME
14*48350Scael.Nm rindex
15*48350Scael.Nd locate character in string
16*48350Scael.Sh SYNOPSIS
17*48350Scael.Fd #include <string.h>
18*48350Scael.Ft char *
19*48350Scael.Fn rindex "const char *s" "int c"
20*48350Scael.Sh DESCRIPTION
21*48350ScaelThe
22*48350Scael.Fn rindex
23*48350Scaelfunction
24*48350Scaellocates the last character
25*48350Scaelmatching
26*48350Scael.Fa c
2741963Sbostic(converted to a
28*48350Scael.Em char )
2941963Sbosticin the null-terminated string
30*48350Scael.Fa s .
31*48350ScaelThe character c is returned if it is found; otherwise NULL is returned.
3241963SbosticIf
33*48350Scael.Fa c
34*48350Scaelis
35*48350Scael.Ql \e0 ,
36*48350Scael.Fn rindex
37*48350Scaellocates the terminating
38*48350Scael.Ql \e0 .
39*48350Scael.Sh SEE ALSO
40*48350Scael.Xr index 3 ,
41*48350Scael.Xr memchr 3 ,
42*48350Scael.Xr strchr 3 ,
43*48350Scael.Xr strcspn 3 ,
44*48350Scael.Xr strpbrk 3 ,
45*48350Scael.Xr strrchr 3 ,
46*48350Scael.Xr strsep 3 ,
47*48350Scael.Xr strspn 3 ,
48*48350Scael.Xr strstr 3 ,
49*48350Scael.Xr strtok 3
50*48350Scael.Sh HISTORY
51*48350ScaelA
52*48350Scael.Fn rindex
53*48350Scaelfunction appeared in
54*48350Scael.At v6 .
55