Version 0 of ne

Updated 2007-10-31 13:49:13 by dkf

Infix operator for string comparison inside expr. Returns true if its arguments are not string-equal.

Its opposite part is eq which returns true if its arguments are string-equal.

Differs from != in such that its arguments cannot be treated as numerical values, so 1 != 1.0 returns false, but 1 ne 1.0 returns true.

Example:

 % expr {"a" eq "b"}
 0
 % expr {"a" ne "b"}
 1
 %

Also comparing text with ne is faster than !=.