ack/modules/src/string/strindex.c

21 lines
352 B
C
Raw Normal View History

1994-06-24 11:31:16 +00:00
/* $Id$ */
1987-03-09 15:15:03 +00:00
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
1987-01-06 11:41:50 +00:00
/* strindex() -- (86/03/18 EHB)
*/
1993-11-10 12:09:49 +00:00
#include "ack_string.h"
1987-01-06 11:41:50 +00:00
char *
strindex(s, c)
1993-11-10 12:09:49 +00:00
register char *s;
int c;
1987-01-06 11:41:50 +00:00
{
while (*s)
if (*s++ == c)
return --s;
return (char *)0;
}