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.
An example using PHP is shown:
<?php
$a = 'string';
$b = 'string';
$tmp = array_unique(array($a, $b));
return -count($tmp)+2;
Simply return true or false (or 1 or 0) 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.