mirror of
https://github.com/kemko/liquid.git
synced 2026-01-03 08:45:42 +03:00
627 B
627 B
title
| title |
|---|
| prepend |
Adds the specified string to the beginning of another string.
Input
```liquid {% raw %} {{ "apples, oranges, and bananas" | prepend: "Some fruit: " }} {% endraw %} ```Output
```text {{ "apples, oranges, and bananas" | prepend: "Some fruit: " }} ```You can also prepend variables:
Input
```liquid {% raw %} {% assign url = "liquidmarkup.com" %}{{ "/index.html" | prepend: url }} {% endraw %}
<p class="code-label">Output</p>
```text
{% assign url = "liquidmarkup.com" %}
{{ "/index.html" | prepend: url }}