Module:OutputBuffer: Difference between revisions

From WikiHaj
m (1 revision imported)
 
(No difference)

Latest revision as of 13:30, 20 January 2020

Documentation for this module may be created at Module:OutputBuffer/doc

return function()
	local buffer = {}
	return function(sep)
		local b = buffer
		buffer = {}
		return table.concat(b, sep)
	end,
	function(text)
		buffer[#buffer + 1] = text
	end,
	function(...)
		buffer[#buffer + 1] = string.format(...)
	end
end