strindex.c 326 B

1234567891011121314151617
  1. /* $Header$ */
  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. char *
  9. strindex(s, c)
  10. register char *s, c;
  11. {
  12. while (*s)
  13. if (*s++ == c)
  14. return --s;
  15. return (char *)0;
  16. }