render


Description:

public static string render (string template, HashMap<string,string> vars)

Renders a template string with the given variables.

Example:

    var vars = new HashMap<string, string> (str_hash, str_equal);
vars.put ("user", "Alice");
string tpl = "Hi " + "{{us" + "er}}!";
string result = Template.render (tpl, vars);
// result == "Hi Alice!"

Parameters:

template

template string.

vars

variable map.

Returns:

rendered string.