/js/lib/Socket.IO-node/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/ArrayUtil.as

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs · ActionScript · 25 lines · 13 code · 4 blank · 8 comment · 4 complexity · d764ee34d244f1dedca16b5741648097 MD5 · raw file

  1. /**
  2. * ArrayUtil
  3. *
  4. * A class that allows to compare two ByteArrays.
  5. * Copyright (c) 2007 Henri Torgemane
  6. *
  7. * See LICENSE.txt for full license information.
  8. */
  9. package com.hurlant.util {
  10. import flash.utils.ByteArray;
  11. public class ArrayUtil {
  12. public static function equals(a1:ByteArray, a2:ByteArray):Boolean {
  13. if (a1.length != a2.length) return false;
  14. var l:int = a1.length;
  15. for (var i:int=0;i<l;i++) {
  16. if (a1[i]!=a2[i]) return false;
  17. }
  18. return true;
  19. }
  20. }
  21. }