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

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

strcmp

Syntax

 
#include <string.h>

int strcmp(const char *s1, const char *s2);

Description

This function compares s1 and s2.

Return Value

Zero if the strings are equal, a positive number if s1 comes after s2 in the ASCII collating sequense, else a negative number.

Portability

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

Example

 
if (strcmp(arg, "-i") == 0)
  do_include();


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004