diff --git a/src/as/com/threerings/util/ArrayUtil.as b/src/as/com/threerings/util/ArrayUtil.as index e27ffe321..d149a0d33 100644 --- a/src/as/com/threerings/util/ArrayUtil.as +++ b/src/as/com/threerings/util/ArrayUtil.as @@ -30,6 +30,15 @@ package com.threerings.util { */ public class ArrayUtil { + /** + * Creates a shallow copy of the array. + * @TODO: add support for copy ranges and deep copies? + */ + public static function copyOf (arr :Array) :Array + { + return arr.slice(); + } + /** * Sort the specified array according to natural order- all elements * must implement Comparable or be null.