বিষয়বস্তুতে চলুন

মডিউল:If empty

From ওয়ার্ল্ডপিডিয়া, the free encyclopedia
enwiki>Codehydro কর্তৃক ০০:৫১, ২৪ ডিসেম্বর ২০১৪ তারিখে সংশোধিত সংস্করণ (lua doesn't cast nil into blank strings apparently)

এই মডিউলের জন্য মডিউল:If empty/নথি-এ নথিপত্র তৈরি করা হয়ে থাকতে পারে

-- 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 args[i] == nil or string.len(args[i]) == 0 do
		i = i + 1
	end
	return args[i]
end
return p