/********************************************************************** * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. * * All Rights Reserved. * * Reference "/usr/src/COPYRIGHT" for applicable restrictions. * **********************************************************************/ static char Sccsid[] = "@(#)index.c 3.0 4/22/86"; #include <stdio.h> /******* * char * * index(str, c) return pointer to character c * char c, *str; * * return codes: * NULL - character not found * pointer - pointer to character */ char * index(str, c) char c, *str; { for (; *str != '\0'; str++) { if (*str == c) return(str); } return(NULL); }