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 table env, using the specified output function f. If env is nil, the global environment (_G) is used. If f is nil, an output function equivalent to

is used, and the result of table.concat(result) is returned.


Loads a template from the file with the given name, and returns a function as described above.