1*61193Sbostic.\" Copyright (c) 1990, 1991, 1993 2*61193Sbostic.\" The Regents of the University of California. 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*61193Sbostic.\" @(#)rindex.3 8.1 (Berkeley) 06/04/93 941963Sbostic.\" 1048350Scael.Dd 1148350Scael.Dt RINDEX 3 1248350Scael.Os 1348350Scael.Sh NAME 1448350Scael.Nm rindex 1548350Scael.Nd locate character in string 1648350Scael.Sh SYNOPSIS 1748350Scael.Fd #include <string.h> 1848350Scael.Ft char * 1948350Scael.Fn rindex "const char *s" "int c" 2048350Scael.Sh DESCRIPTION 2148350ScaelThe 2248350Scael.Fn rindex 2348350Scaelfunction 2448350Scaellocates the last character 2548350Scaelmatching 2648350Scael.Fa c 2741963Sbostic(converted to a 2848350Scael.Em char ) 2941963Sbosticin the null-terminated string 3048350Scael.Fa s . 3152229Sbostic.Sh RETURN VALUES 3252229SbosticA pointer to the character is returned if it is found; otherwise 3352229SbosticNULL is returned. 3441963SbosticIf 3548350Scael.Fa c 3648350Scaelis 3748350Scael.Ql \e0 , 3848350Scael.Fn rindex 3948350Scaellocates the terminating 4048350Scael.Ql \e0 . 4148350Scael.Sh SEE ALSO 4248350Scael.Xr index 3 , 4348350Scael.Xr memchr 3 , 4448350Scael.Xr strchr 3 , 4548350Scael.Xr strcspn 3 , 4648350Scael.Xr strpbrk 3 , 4748350Scael.Xr strrchr 3 , 4848350Scael.Xr strsep 3 , 4948350Scael.Xr strspn 3 , 5048350Scael.Xr strstr 3 , 5148350Scael.Xr strtok 3 5248350Scael.Sh HISTORY 5348350ScaelA 5448350Scael.Fn rindex 5548350Scaelfunction appeared in 5648350Scael.At v6 . 57