www.delorie.com/djgpp/doc/libc/libc_753.html   search  
libc.a reference

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

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/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

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


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004