How to combine two string in twig?

sh3211 picture sh3211 · May 6, 2012 · Viewed 71.6k times · Source

I want to do something like this:

{% set c=a+b %}

Where a and b are strings.
How can I do it?

Answer

Shimon S picture Shimon S · May 6, 2012

The way to do it is:

{% set c = a ~ b %}