delorie.com/djgpp/doc/libc/libc_470.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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.

Portability

ANSI/ISO C No
POSIX No

Example

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


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004