选择第一个字符串,我需要什么:如何嫩枝
我从字符串只需要名字。
Like String : Bodo Jorg Udo .. (i have .. notation if string of length is more then 20).
这里是源代码
{%if item.metadata.name |length < 20 %} {{item.metadata.name}} {%else%}{{WordLimit(item.metadata.name,10,10)}} .. {%endif%}
输出应该像
Bodo
拆分后的广告d第一个过滤器,它会给你你的名字。 '{%set yourVariable = yourString | split('')| First()%}' – kodvin 2014-09-08 13:53:32