- 排序
<#assign mylist=[1,2,3,4,5,6,7]>
<#list mylist?sort as item>
${item}
</#list>
- 翻转列表reverse
<#assign mylist=[1,2,3,4,5,6,7]>
<#list mylist?reverse as item>
${item}
</#list>
- 列表大小
${mylist?size}
<#assign mylist=[1,2,3,4,5,6,7]>
<#list mylist?sort as item>
${item}
</#list>
<#assign mylist=[1,2,3,4,5,6,7]>
<#list mylist?reverse as item>
${item}
</#list>
${mylist?size}
本文标题:freemarker内置函数
本文链接:https://www.haomeiwen.com/subject/cqdumxtx.html
网友评论