Pristine Ack-5.5
[Ack-5.5.git] / modules / src / string / strrindex.c
1 /* $Id: strrindex.c,v 1.5 1994/06/24 11:23:17 ceriel Exp $ */
2 /*
3  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4  * See the copyright notice in the ACK home directory, in the file "Copyright".
5  */
6
7 #include "ack_string.h"
8
9 char *
10 strrindex(str, chr)
11         register char *str;
12         int chr;
13 {
14         register char *retptr = 0;
15
16         while (*str)
17                 if (*str++ == chr)
18                         retptr = &str[-1];
19         return retptr;
20 }