Go to: Synopsis. Return value. Related. MEL examples.
strcmp
<string> <string>
strcmp is undoable, queryable, and editable.
Compares its 2 string arguments and returns an integer less than, equal to, or greater than 0, based upon whether the first argument is lexicographically less than, equal to, or greater than the second argument.string $s1="hello"; string $s2="goodbye"; int $compare = `strcmp $s1 $s2`; // Result: 1 // $compare = `strcmp $s2 $s1`; // Result: -1 // $compare = `strcmp "hello" $s1`; // Result: 0 //