VMS Help  —  CRTL  strcmp
    Compares two ASCII character strings and returns a negative,
    0, or positive integer, indicating that the ASCII values of the
    individual characters in the first string are less than, equal
    to, or greater than the values in the second string.

    Format

      #include  <string.h>

      int strcmp  (const char *str_1, const char *str_2);

1  –  Arguments

 str_1, str_2

    Pointers to character strings.

2  –  Description

    The strings are compared until a null character is encountered or
    until the strings differ.

3  –  Return Values

    < 0                Indicates that str_1 is less than str_2.
    > 0                Indicates that str_1 is greater than str_2.
Close Help