@register_tag<EOL>def concatenate(*args, **kwargs):
divider = kwargs.get('<STR_LIT>', '<STR_LIT>')<EOL>result = '<STR_LIT>'<EOL>for arg in args:<EOL><INDENT>if result == '<STR_LIT>':<EOL><INDENT>result += arg<EOL><DEDENT>else:<EOL><INDENT>result += '<STR_LIT>'.format(divider, arg)<EOL><DEDENT><DEDENT>return result<EOL>
Concatenates the given strings.

Usage::

    {% load libs_tags %}
    {% concatenate "foo" "bar" as new_string %}
    {% concatenate "foo" "bar" divider="_" as another_string %}

The above would result in the strings "foobar" and "foo_bar".