Go to the first, previous, next, last section, table of contents.


strchr

Syntax

#include <string.h>

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

Description

This function returns a pointer to the first occurrence of c in s. Note that if c is NULL, this will return a pointer to the end of the string.

Return Value

A pointer to the character, or NULL if it wasn't found.

Portability

ANSI, POSIX

Example

char *slash = strchr(filename, '/');


Go to the first, previous, next, last section, table of contents.