Module:OutputBuffer

From the Croc Wiki, the Croc encyclopedia
Revision as of 20:19, January 25, 2022 by DarkMatterMan4500 (talk | contribs) (6 revisions imported from wikipedia:Module:OutputBuffer)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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