4.3BSD beta release manual page
[unix-history] / usr / src / lib / libc / string / index.c
/* @(#)index.c 4.1 (Berkeley) %G% */
/*
* Return the ptr in sp at which the character c appears;
* NULL if not found
*/
#define NULL 0
char *
index(sp, c)
register char *sp, c;
{
do {
if (*sp == c)
return(sp);
} while (*sp++);
return(NULL);
}