From 2e735c5b6cdf59c4a96af39497b66a1e36371aea Mon Sep 17 00:00:00 2001 From: bt Date: Wed, 17 Sep 2008 22:20:08 +0300 Subject: Some docs written by Thorns. Need reviewing. --- util/stanza.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util/stanza.lua') diff --git a/util/stanza.lua b/util/stanza.lua index 35277e9c..3a17fc20 100644 --- a/util/stanza.lua +++ b/util/stanza.lua @@ -1,6 +1,6 @@ local t_insert = table.insert; local t_remove = table.remove; -local format = string.format; +local s_format = string.format; local tostring = tostring; local setmetatable = setmetatable; local pairs = pairs; @@ -97,10 +97,10 @@ function stanza_mt.__tostring(t) local attr_string = ""; if t.attr then - for k, v in pairs(t.attr) do if type(k) == "string" then attr_string = attr_string .. format(" %s='%s'", k, tostring(v)); end end + for k, v in pairs(t.attr) do if type(k) == "string" then attr_string = attr_string .. s_format(" %s='%s'", k, tostring(v)); end end end - return format("<%s%s>%s", t.name, attr_string, children_text, t.name); + return s_format("<%s%s>%s", t.name, attr_string, children_text, t.name); end function stanza_mt.__add(s1, s2) -- cgit v1.2.3