STRCMP - compare two strings.

(ANSI Standard)

Usage:

#include <string.h>
i = strcmp( s1, s2 );

Where:

const char *s1, *s2;
are the strings to be compared.
int i;
gives the results of the comparison. "i" is zero if the strings are identical. "i" is positive if string "s1" is greater than string "s2", and is negative if string "s2" is greater than string "s1". Comparisons of "greater than" and "less than" are made according to the ASCII collating sequence.

Description:

"strcmp" compares the string "s1" to the string "s2". Both strings must be terminated by the usual '\0' character.

See Also:

expl c lib strncmp

expl c lib memcmp

Copyright © 1996, Thinkage Ltd.