strcmp, stricmp
strcmp, stricmp — compare strings.
strcmp (string, string)
stricmp (string, string)
stringAny string.
A negative number if the first string is ordinally
less than the second string according to the ASCII
character set, a positive number if the first string
is greater than the second, and zero if the two strings are exactly
equal.
These functions can be used as comparison functions for sort and insert.
stricmp performs the same function as
strcmp, but alphabetic characters are compared
without regard to case. That is, "A" and "a" are considered equal by
stricmp, but different by
strcmp.
Gamma>strcmp("apple", "peach");-15Gamma>strcmp("peach", "apple");15Gamma>strcmp("Apple","Apple");0Gamma>strcmp("Apple","Apple pie");-32Gamma>strcmp("Apple","apple");-32Gamma>stricmp("Apple","apple");0Gamma>