is an option for template functions that specifies how fragments should be assembled to give the result of applying a template.
CombinerFunction
is an option for template functions that specifies how fragments should be assembled to give the result of applying a template.
Details
- With CombinerFunction->Automatic, the following settings are used:
-
StringTemplate StringJoin XMLTemplate StringJoin FileTemplate Automatic NotebookTemplate Automatic TemplateObject Inherited
Examples
Basic Examples (2)
Return the uncombined list of template elements:
t = StringTemplate["The next planet is `planet`: mass is `mass`.", CombinerFunction -> Identity];
TemplateApply[t, <|"planet" -> "Jupiter", "mass" -> "big"|>]The CombinerFunction can be an export format:
TemplateApply[
StringTemplate["The next planet is `planet`: mass is `mass`, and \" will be escaped in json.",
InsertionFunction -> Identity,
CombinerFunction -> "JSON"],
<|"planet" -> "Jupiter", "mass" -> "big"|>
]See Also
Related Guides
History
Text
Wolfram Research (2014), CombinerFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/CombinerFunction.html.
CMS
Wolfram Language. 2014. "CombinerFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CombinerFunction.html.
APA
Wolfram Language. (2014). CombinerFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CombinerFunction.html
BibTeX
@misc{reference.wolfram_2026_combinerfunction, author="Wolfram Research", title="{CombinerFunction}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/CombinerFunction.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_combinerfunction, organization={Wolfram Research}, title={CombinerFunction}, year={2014}, url={https://reference.wolfram.com/language/ref/CombinerFunction.html}, note=[Accessed: 12-June-2026]}