Module:OutputBuffer: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Jackmcbarn
change output order and fix bug
Ookami (talk | contribs)
m 6 revisions imported
 
(One intermediate revision by one other user not shown)
(No difference)

Latest revision as of 14:08, 3 September 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