Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

strchr - scan string for characters

&pagelevel(4)&pagelevel

Syntax

#include <string.h>

char *strchr(const char *s, int c);

Description

strchr() searches for the first occurrence of character c in string s and returns a pointer
to the located position in s if successful.

The terminating null byte (\0) is considered to be part of the string.

Return val.

Pointer to the position of c in string s if successful.

Null pointer if c is not contained in string s.

Notes

See also

strchr() and index() are equivalent.

index(), rindex(), strrchr(), string.h.