join(合并字符串)


将数组中的各个字符串合并为一个字符串,并将 split 参数作为字符串之间的分隔符。

输入
{% assign beatles = "John, Paul, George, Ringo" | split: ", " %} {{ beatles | join: " and " }}
输出
John and Paul and George and Ringo
song song
4 个月前
0

扫描下方二维码手机阅读文章

0 0