author | Kim Alvefur <zash@zash.se> |
Wed, 03 Sep 2014 00:37:41 +0200 | |
changeset 6384 | 3f4809d01783 |
parent 6382 | 57d23c26039b |
child 6385 | d87195d53d84 |
child 6387 | 6d769afd0bc5 |
util/hex.lua | file | annotate | diff | comparison | revisions |
--- a/util/hex.lua Tue Sep 02 22:33:11 2014 +0200 +++ b/util/hex.lua Wed Sep 03 00:37:41 2014 +0200 @@ -8,11 +8,11 @@ return s_char(tonumber(h, 16)); end -function to(s) +local function to(s) return s:gsub(".", char_to_hex); end -function from(s) +local function from(s) return s:gsub("..", hex_to_char); end