strchr

OS/161 Reference Manual

Name

strchr - search string for character

Library

Standard C Library (libc, -lc)

Synopsis

#include <string.h>

char *
strchr(const char *string, int chr);

Description

strchr searches string from the left for the first instance of the character chr. The characters found and chr are cast to and compared as the type unsigned char.

Return Values

strchr returns a pointer to the character found. If the character is not found, NULL is returned.