Software /
code /
prosody
Changeset
6384:3f4809d01783
util.hex: Use locals!
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 03 Sep 2014 00:37:41 +0200 |
parents | 6382:57d23c26039b |
children | 6385:d87195d53d84 6387:6d769afd0bc5 |
files | util/hex.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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