join将数组合并为字符串
ZKEASOFT August 28, 2018
join
join
用于使用参数作为分隔符将数组中的项组合为单个字符串。
输入
{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
{{ beatles | join: " and " }}
输出
John and Paul and George and Ringo
ZKEASOFT August 28, 2018
join
用于使用参数作为分隔符将数组中的项组合为单个字符串。
输入
{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
{{ beatles | join: " and " }}
输出
John and Paul and George and Ringo