Module:OutputBuffer

From Zoophilia Wiki
Revision as of 23:50, 25 June 2014 by meta>Jackmcbarn (make a printf-like too)
Jump to navigationJump to search

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

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