strindex.c 352 B

1234567891011121314151617181920
  1. /* $Id$ */
  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. /* strindex() -- (86/03/18 EHB)
  7. */
  8. #include "ack_string.h"
  9. char *
  10. strindex(s, c)
  11. register char *s;
  12. int c;
  13. {
  14. while (*s)
  15. if (*s++ == c)
  16. return --s;
  17. return (char *)0;
  18. }