www.delorie.com/djgpp/doc/libc-2.01/libc_398.html   search  
Go to the first, previous, next, last section, table of contents.


index

Syntax

#include <strings.h>

char *index(const char *string, int ch);

Description

Returns a pointer to the first occurrence of ch in string. Note that the NULL character counts, so if you pass zero as ch you'll get a pointer to the end of the string back.

Return Value

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

Example

if (index(path, '*'))
  do_wildcards(path);


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

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