1.\" Copyright (c) 1990, 1991 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Chris Torek. 6.\" %sccs.include.redist.man% 7.\" 8.\" @(#)rindex.3 5.3 (Berkeley) 01/21/92 9.\" 10.Dd 11.Dt RINDEX 3 12.Os 13.Sh NAME 14.Nm rindex 15.Nd locate character in string 16.Sh SYNOPSIS 17.Fd #include <string.h> 18.Ft char * 19.Fn rindex "const char *s" "int c" 20.Sh DESCRIPTION 21The 22.Fn rindex 23function 24locates the last character 25matching 26.Fa c 27(converted to a 28.Em char ) 29in the null-terminated string 30.Fa s . 31.Sh RETURN VALUES 32A pointer to the character is returned if it is found; otherwise 33NULL is returned. 34If 35.Fa c 36is 37.Ql \e0 , 38.Fn rindex 39locates the terminating 40.Ql \e0 . 41.Sh SEE ALSO 42.Xr index 3 , 43.Xr memchr 3 , 44.Xr strchr 3 , 45.Xr strcspn 3 , 46.Xr strpbrk 3 , 47.Xr strrchr 3 , 48.Xr strsep 3 , 49.Xr strspn 3 , 50.Xr strstr 3 , 51.Xr strtok 3 52.Sh HISTORY 53A 54.Fn rindex 55function appeared in 56.At v6 . 57