COMPARE - compare two B strings.

Usage:

B:
   ret = compare( string1, string2 );
/* C users use "strcmp" */

Where:

ret
is zero if "string1" and "string2" are identical. If they are not identical, "ret" receives a number whose absolute value is one more than the first position in which the two strings differ. For example,
compare( "abd", "abc" );

returns a 3. "ret" receives a positive value if "string1>string2" and it receives a negative value if "string1<string2".

Description:

COMPARE compares two strings. It returns a zero if the two strings are identical and otherwise indicates the first position in which the two differ.

See Also:

expl b lib equal

Copyright © 1996, Thinkage Ltd.