strchr


Character string search (start position of specified character)

[Classification]

Standard library

[Syntax]

#include <string.h>

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

[Return value]

Returns a pointer indicating the character that has been found. If c does not appear in this character string, the null pointer is returned.

[Description]

This function obtains the position at which a character the same as c converted into char type appears in the character string indicated by s. The null character (\0) indicating termination is regarded as part of this character string.