mirror of
https://github.com/kemko/liquid.git
synced 2026-01-07 18:55:41 +03:00
559 B
559 B
title
| title |
|---|
| split |
The split filter takes on a substring as a parameter. The substring is used as a delimiter to divide a string into an array. You can output different parts of an array using array filters.
Input
{% highlight liquid %}{% raw %} {% assign words = "Hi, how are you today?" | split: ' ' %}{% for word in words %} {{ word }} {% endfor %} {% endraw %}{% endhighlight %}
Output
{% highlight text %} Hi, how are you today? {% endhighlight %}