Reference
templet.loadstring(s)-
Loads a template from the given string, and returns a function.
That function takes as arguments
([env[, f]]), and, when called, renders the template in the environment specified by the tableenv, using the specified output functionf. Ifenvis nil, the global environment (_G) is used. Iffis nil, an output function equivalent tolocal result = {} local f = function(chunk) if chunk ~= nil then table.insert(result, tostring(chunk)) end endis used, and the result of
table.concat(result)is returned. templet.loadfile(filename)-
Loads a template from the file with the given name, and returns a function as described above.