strcmp

ds2.1.1/lib/doc/efun/all/strcmp · 692 B

From the archive ds2.1.1.zip

Download the archive   « Back to the archive contents

strcmp - determines the lexical relationship between two strings

int strcmp( string one, string two );

This implementatin of strcmp() is identical to the one found in C libraries.
If string one lexically precedes string two, then strcmp() returns a number
less than 0.  If the two strings have the same value, strcmp() returns 0.
If string two lexically precedes string one, then strcmp() returns a number
greater than 0.  This efunction is particularly useful in the compare
functions needed by sort_array().

Note that relational operators (<, >, etc) can also be used to compare
strings.

See also:
 sort_array

 Tim Hollebeek  Beek@ZorkMUD, Lima Bean, IdeaExchange, and elsewhere

Site Stats

Snippets: 1791
Codebases: 571