prepend

Adds the specified string to the beginning of another string.

Input

{{ "apples, oranges, and bananas" | prepend: "Some fruit: " }}

Output

Some fruit: apples, oranges, and bananas

prepend can also be used with variables:

Input

{% assign url = "example.com" %}
{{ "/index.html" | prepend: url }}

Output

example.com/index.html

© 2005, 2006 Tobias Luetke
Licensed under the MIT License.
https://shopify.github.io/liquid/filters/prepend/