Created
February 14, 2015 02:22
-
-
Save MyNameIsKodos/343c0e09abac85d2a023 to your computer and use it in GitHub Desktop.
Random stuff lib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function str2hex(a) return a:gsub(".",function(a) return string.format("%02x",a:byte()) end) end | |
function hex2str(a) return a:gsub("..",function(a) return string.char(tonumber(a,16)) end) end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment