/ Published in: Lua
Expand |
Embed | Plain Text
--- Returns HEX representation of str function str2hex(str) local hex = '' while #str > 0 do local hb = num2hex(string.byte(str, 1, 1)) if #hb < 2 then hb = '0' .. hb end hex = hex .. hb str = string.sub(str, 2) end return hex end
You need to login to post a comment.
