/*- * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. * * %sccs.include.proprietary.c% */ #ifndef lint static char sccsid[] = "@(#)index.c 8.1 (Berkeley) 06/06/93"; #endif /* not lint */ #include /* * return pointer to character c * * return codes: * NULL - character not found * pointer - pointer to character */ char * index(str, c) register char c, *str; { for (; *str != '\0'; str++) { if (*str == c) return str; } return NULL; }