From 714ab29a8858d1fd7b4dd5314c152e192d0f7ef4 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Mon, 12 May 2008 23:33:16 +0000 Subject: [PATCH] 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 --- src/as/com/threerings/util/StringUtil.as | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/as/com/threerings/util/StringUtil.as b/src/as/com/threerings/util/StringUtil.as index e3882de5a..597dc0eaf 100644 --- a/src/as/com/threerings/util/StringUtil.as +++ b/src/as/com/threerings/util/StringUtil.as @@ -470,13 +470,7 @@ public class StringUtil */ public static function toHex (n :uint, width :uint) :String { - var result :String = ""; - while (width > 0) { - result = HEX[n & 0x0f] + result; - n >>>= 4; - width --; - } - return result; + return prepad(n.toString(16), width, "0"); } /**