Determine if Strings are equal Your task is simple. Determine if one string equals the other (not address, the value) without the use of equality operators (such as ==, ===, or .equal()) or inequality (!=, !==) anything similar for other languages. This means anywhere! You may not use these operators anywhere in the code. You may however, you use toggles such as !exp as you're not directly comparing the exp != with something else.

In addition, you may not use any functions such as strcmp, strcasecmp, etc.

As for comparison operators (&gt;=, &lt;=, &gt;, &lt;), they are also disallowed. I realize that some answers include this, but I'd really like to see more answers that don't borderline the equality operator.


An example using PHP is shown:

&lt;?php

$a = 'string';
$b = 'string';

$tmp = array_unique(array($a, $b));

return -count($tmp) + 2;


Simply return true or false (or something that evaluates in the language to true or false like 0 or 1) to indicate if the strings match. The strings should be hardcoded seen in the above example. The strings should not be counted in the golf, so if you declare the variable before hand, don't count the declaration.
Python 49 45 18 22 15 14
( + 3 if string variables are considered)
print{a:0,b:1}[a]

The string should be hard coded at the two occurrences of a and one occurrence of b surrounded by quotes.
a and b should be pre-initialized to the strings.

Python shell, 9
( + 3 if string variables are considered)
{a:0,b:1}[a]

Output in shell
&gt;&gt;&gt; a = 'string'
&gt;&gt;&gt; b = 'string'
&gt;&gt;&gt; {a:0,b:1}[a]
1
&gt;&gt;&gt; a = 'string'
&gt;&gt;&gt; b = 'stringgg'
&gt;&gt;&gt; {a:0,b:1}[a]
0
&gt;&gt;&gt; {'string':0,'string':1}['string']
1
&gt;&gt;&gt; {'stringggg':0,'string':1}['stringggg']
0
&gt;&gt;&gt; 


Explanation
Creates a dict(hash table) with the key of first and second string.
If second string is the same, the value of first is replaced by that of second.
Finally, we print the value of first key.
EDIT: OP allowed 0/1 instead of False/True as well as using pre-initialized variables.