velocity: do something except in last loop iteration(速度:在最后一个循环迭代中做一些事情)
问题描述
在速度方面,我想在最后一个循环中做一些不同的事情.
In velocity, I want to do something different in the last loop.
正确的成语是什么?
相关:增强for循环的最后一次迭代在java中
推荐答案
如果你在最后一次迭代,你可以使用测试::
You can use a test if you are in last iteration::
#foreach( $item in $list )
$item.text #if( $foreach.hasNext ), #end
#end
这篇关于速度:在最后一个循环迭代中做一些事情的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!