Skip to content

TemplateIf

TemplateIf(condition-expression, true-expression, false-expression)

in TemplateApply evaluation insert true-expression if condition-expression evaluates to true, otherwise insert false-expression.

Examples

>> t=TemplateIf( TemplateSlot("summer"), "in summer ice cream is delicious", "ice cream is boring in winter"); TemplateApply(t, <|"summer" -> True|>)
in summer ice cream is delicious

StringTemplate, TemplateApply, TemplateSlot

Implementation status

  • ✅ - full supported

Github