cc-utilities/util/init.lua
2024-10-26 01:49:19 +02:00

13 lines
270 B
Lua

local Util = {}
function Util.valueToHex(value)
local collect = {}
while value > 0 do
local idx = value % 16
table.insert(collect, 1, ("0123456789ABCDEF"):sub(idx, idx))
value = bit.brshift(value, 4)
end
return table.concat(collect)
end
return Util