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

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

strstr

Syntax

 
#include <string.h>

char *strstr(const char *s1, const char *s2);

Description

This function finds the first occurrence of s2 in s1.

Return Value

A pointer within s1, or NULL if s2 wasn't found.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
if (strstr(command, ".exe"))
  do_exe();


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