Jump to content

Module:OutputBuffer: Difference between revisions

From Fifth Empire Wiki
change output order and fix bug
m 5 revisions imported from wikipedia:Module:OutputBuffer
 
(2 intermediate revisions by 2 users not shown)
(No difference)

Latest revision as of 20:49, 24 January 2026

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