# HG changeset patch # User Kim Alvefur # Date 1409697461 -7200 # Node ID 3f4809d01783bb57121f05fcde2be4b35a40a9f2 # Parent 57d23c26039b87a31d7ade5d14e803560c71fa7c util.hex: Use locals! diff -r 57d23c26039b -r 3f4809d01783 util/hex.lua --- 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