Miscellaneous script utility functions.
static arrayToMap (arr:Array<{val:Dynamic, key:String}>):Map<String, Dynamic>
Converts an array of key, val objects into a string map.
Parameters:
arr
Array of { key: String, val: Dynamic }.
Returns:
Map.
static shuffleArray<T> (arr:Array<T>):Array<T>
Shuffles a given array.
Parameters:
arr
Array to shuffle.
Returns:
Shuffled array.
static unique (src:Array<Int>):Array<Int>
Returns unique elements in integer array.
Parameters:
src
Source array.
Returns:
Destination array.
static utf8length (s:String):Int
Returns UTF8 string length in UTF8 characters.
Parameters:
s
String.
Returns:
String length.