Add support for 'openfl' style command

This commit is contained in:
Joshua Granick
2014-10-22 14:19:56 -07:00
parent 27bacd6148
commit 141193e4c8
7 changed files with 257 additions and 87 deletions

View File

@@ -154,6 +154,22 @@ class StringHelper {
}
public static function generateHashCode (value:String):Int {
var hash = 5381;
var length = value.length;
for (i in 0...value.length) {
hash = ((hash << 5) + hash) + value.charCodeAt (i);
}
return hash;
}
public static function generateUUID (length:Int, radix:Null<Int> = null, seed:Null<Int> = null):String {
var chars = uuidChars.split ("");