- string equal ?-nocase? ?-length int? string1 string2
This command may seem similar to string compare. The difference is that this is only an equal (return value of 1) or not equal (return value of 0) type comparison.Or it may seem similar to string match. The difference is that match uses patterns (e.g.,
% string match "fred*" "freda" 1 % string equal "fred*" "freda" 0 % string equal -nocase -length 3 "abcde" "abcdefg"returns 1.
string equal -length 0 a breturns 1.