NetBSD/gnu/libexec/uucp/libuucp/strchr.c

17 lines
255 B
C
Raw Normal View History

1993-08-04 23:33:45 +04:00
/* strchr.c
Look for a character in a string. This works for a null byte. */
#include "uucp.h"
char *
strchr (z, b)
const char *z;
int b;
{
b = (char) b;
while (*z != b)
if (*z++ == '\0')
return NULL;
return (char *) z;
}