www.delorie.com/djgpp/doc/libc-2.01/libc_459.html   search  
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.

Example

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


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

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997