isEqualTo – Talk
Jump to navigation
Jump to search
fnc_areEqual = {
private ["_b","_var1","_var2"];
_b = true;
for [{_i = 1},{_i < (count _this) && _b},{_i = _i + 1}] do {
_var1 = _this select (_i-1);
_var2 = _this select _i;
if (!(_var1 isEqualTo _var2)) then {_b = false;};
};
_b
};
["A","a","a"] call fnc_areEqual; // false
["A","a","a"] call BIS_fnc_areEqual; // true
Moved this note here, after testing performance of this solution, To compare, where BIS_fnc_areEqual which is pretty slow takes 0.66ms to complete, this ^^^^ one takes 333.65ms. Killzone Kid (talk) 13:39, 21 May 2015 (CEST)