Posted: Mon Sep 11, 2017 2:25 pm Post subject: Function 4bytes to hex please.
hello friends would like to ask for help with a function. I want to convert 4bytes example to the value 100 for hex code = 64 but I did not find the function for that.
I found the one that makes hex for string which is this below.
I would like the function similar to 4bytes to hex.
I appreciate the answers.
Code:
function string.fromhex(str)
return (str:gsub('..', function (cc)
return string.char(tonumber(cc, 16))
end))
end
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum