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


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.

Example

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


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

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