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


memchr

Syntax

#include <string.h>

void *memchr(const void *string, int ch, size_t num);

Description

This function searches num bytes starting at string, looking for the first occurence of ch.

Return Value

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

Portability

ANSI, POSIX

Example

if (memchr(path, '/', strlen(path))
  do_slash();


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