Jump to content

Module:OutputBuffer

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jackmcbarn (talk | contribs) at 23:46, 25 June 2014 (use the right table). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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