BSD 3 development
[unix-history] / usr / src / cmd / uucp / index.c
CommitLineData
e8e1f34c
BJ
1#include <stdio.h>
2
3
4/*******
5 * char *
6 * index(str, c) return pointer to character c
7 * char c, *str;
8 *
9 * return codes:
10 * NULL - character not found
11 * pointer - pointer to character
12 */
13
14char *
15index(str, c)
16char c, *str;
17{
18 for (; *str != '\0'; str++) {
19 if (*str == c)
20 return(str);
21 }
22
23 return(NULL);
24}