Occam's razor. toString()ing an int in hex format is built-in to flash.
Didn't touch other stuff. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5085 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -470,13 +470,7 @@ public class StringUtil
|
|||||||
*/
|
*/
|
||||||
public static function toHex (n :uint, width :uint) :String
|
public static function toHex (n :uint, width :uint) :String
|
||||||
{
|
{
|
||||||
var result :String = "";
|
return prepad(n.toString(16), width, "0");
|
||||||
while (width > 0) {
|
|
||||||
result = HEX[n & 0x0f] + result;
|
|
||||||
n >>>= 4;
|
|
||||||
width --;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user