Compares two string/nodes regardless of their case.

@private
@param {String/Node} str1 Node or string to compare.
@param {String/Node} str2 Node or string to compare.
@return {boolean} True/false if they match.
970291
function isEq(str1, str2) {
        str1 = str1 || '';
        str2 = str2 || '';

        str1 = '' + (str1.nodeName || str1);
        str2 = '' + (str2.nodeName || str2);

        return str1.toLowerCase() == str2.toLowerCase();
      }
690422
def compare(string1, string2):
    
    if len(string1) != len(string2):
        return False
    result = True
    for c1, c2 in izip(string1, string2):
        result &= c1 == c2
    return result
168901
function isSameToken(token1, token2) {
  if (isValidToken(token1) && isValidToken(token2)) {
    return String(token1) === String(token2);
  }

  return false;
}
1154183
function(str, end) {
    return (str.length >= end.length &&
            str.substring(str.length - end.length) === end);
  }
1024240
public boolean areEquals(String str1, String str2) {

		return (str1 == null && str2 == null || str1 != null && str2 != null && str1.equals(str2));
	}
1329909
public char match(String str1, String str2) {
        invocationCount++;
        char rel = IMappingElement.IDK;

        if (str1 == null || str2 == null) {
            rel = IMappingElement.IDK;
        } else {
            if ((str1.length() > 3) && (str2.length() > 3)) {
                if (str1.startsWith(str2)) {
                    if (str1.contains(" ")) {
                        rel = IMappingElement.LESS_GENERAL;
                    } else {
                        rel = IMappingElement.EQUIVALENCE;
                    }
                } else {
                    if (str2.startsWith(str1)) {
                        if (str2.contains(" ")) {
                            rel = IMappingElement.MORE_GENERAL;
                        } else {
                            rel = IMappingElement.EQUIVALENCE;
                        }
                    }
                }
            }//if ((str1.length() > 3) && (str2.length() > 3)) {
        }

        if (rel != IMappingElement.IDK) {
            relCount++;
            addCase(str1, str2, rel);
        }
        return rel;
    }
25442
def match_strings(str1, str2):
    
    i = 0
    min_len = len(str1) if len(str1) < len(str2) else len(str2)
    while i < min_len and str1[i] == str2[i]: i += 1
    return i
970374
public static float compare(final int numOfBits, final String str1,
            final String str2) {
        return compare(numOfBits, BaseEncoding.base64().decode(str1),
                BaseEncoding.base64().decode(str2));
    }
251055
public static boolean equal(String str1, String str2) {
		return str1 != null && str2 != null && str1.equals(str2);
	}
344567
public static boolean compareStrings(String s1, String s2) {
        if (s1 == s2)
            return true;
        if (s1 != null && s2 != null && s1.equals(s2))
            return true;
        return false;
    }
1227377
public static function compareStr($str1, $str2) {
		$len1 = static::binaryStrlen($str1);
		$len2 = static::binaryStrlen($str2);
		$len = min($len1, $len2);
		$diff = $len1 ^ $len2;

		for ($i = 0; $i < $len; $i++) {
			$diff |= ord($str1[$i]) ^ ord($str2[$i]);
		}

		return $diff === 0;
	}
1319748
function (e1, e2) {
      var d1 = e1.dom(), d2 = e2.dom();
      return d1 === d2 ? false : d1.contains(d2);
    }
1324515
@Override
  public boolean isEqual(String data1, String data2)
  {
    return LangUtils.isEqual(data1, data2);
  }
1358242
public static boolean equalsText(String s1, String s2) {
		if (s1 == null) {
			if (s2 != null) {
				return false;
			}
		} else {
			if (s2 == null) {
				return false;
			}
		}
		if ((s1 != null) && (s2 != null)) {
			s1 = s1.replaceAll("\\s", "").toLowerCase();
			s2 = s2.replaceAll("\\s", "").toLowerCase();
			if (!s1.equals(s2)) {
				return false;
			}
		}
		return true;
	}
1341607
function _comparer (a, b) {
    var result = 0;

    if (typeof a !== typeof b) {
        a = String(a);
        b = String(b);
    }

    if (!areSVZ(a, b)) {
        // eslint-disable-next-line no-self-compare
        result = a > b || a !== a ? 1 : -1;
    }

    return result;
}
19085
private static int compare(Treenode item1, Treenode item2) {
        String label1 = item1.getLabel();
        String label2 = item2.getLabel();
        return label1 == label2 ? 0 : label1 == null ? -1 : label2 == null ? -1 : label1.compareToIgnoreCase(label2);
    }
1015539
function compare(a, b) {
  invariant(typeof a === typeof b, '"a" and "b" must be of the same type');

  if (a > b) {
    return 1;
  } else if (a < b) {
    return -1;
  } else {
    return 0;
  }
}