package haxeAvailable on all platforms
Template provides a basic templating mechanism to replace values in a source String, and to have some basic logic.
A complete documentation of the supported syntax is available at: https://haxe.org/manual/std-template.html
Creates a new Template instance from
str is parsed into tokens, which are stored for internal use. This means that multiple execute() operations on a single Template instance are more efficient than one execute() operations on multiple Template instances.
str is null, the result is unspecified.
this Template, taking into account
context for replacements and
macros for callback functions.
context has a field 'name', its value replaces all occurrences of ::name:: in the Template. Otherwise Template.globals is checked instead, If 'name' is not a field of that either, ::name:: is replaced with null.
macros has a field 'name', all occurrences of $$name(args) are replaced with the result of calling that field. The first argument is always the resolve() method, followed by the given arguments. If
macros has no such field, the result is unspecified.
context is null, the result is unspecified. If
macros is null, no macros are used.
Global replacements which are used across all Template instances. This has lower priority than the context argument of execute().
© 2005–2018 Haxe Foundation
Licensed under a MIT license.