C++ Programming/Code/Standard C Library/Functions/strchr

From Wikibooks, open books for an open world
Jump to navigation Jump to search

strchr[edit | edit source]

Syntax
#include <cstring>
char *strchr( const char *str, int ch );

The function strchr() returns a pointer to the first occurrence of ch in str, or NULL if ch is not found.

Related topics
strcat - strcmp - strcpy - strlen - strncat - strncmp - strncpy - strpbrk - strrchr -strspn - strstr - strtok