Truncate helper, txtlen is local.

This commit is contained in:
Adrian C. (anrxc) 2009-08-07 23:19:50 +02:00
parent 3b3e0dc7cf
commit 41d4acb7a2
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ end
--{{{ Truncate a string
function truncate(text, maxlen)
txtlen = text:len()
local txtlen = text:len()
if txtlen > maxlen then
text = text:sub(1, maxlen - 3) .. "..."