Module:If empty: Difference between revisions
Jump to navigation
Jump to search
imported>Codehydro (oh, misread doc; thought opposite purpose for template) |
imported>Codehydro mNo edit summary |
||
Line 5: | Line 5: | ||
local i = 0 | local i = 0 | ||
args[table.getn(args)] = '' | args[table.getn(args)] = '' | ||
while | while 0 == string.len(args[i]) do | ||
i = i + 1 | i = i + 1 | ||
end | end |
Revision as of 18:45, 23 December 2014
Documentation for this module may be created at Module:If empty/doc
-- this is intended to replace {{If empty}} local p = {}; function p.run(frame) local args = require('Module:Arguments').getArgs(frame) local i = 0 args[table.getn(args)] = '' while 0 == string.len(args[i]) do i = i + 1 end return args[i] end return p