velocity: do something except in last loop iteration

后端 未结 4 1943
南方客
南方客 2021-01-03 19:41

In velocity, I want to do something different in the last loop.

What is the correct idiom?

RELATED: Last iteration of enhanced for loop in

4条回答
  •  既然无缘
    2021-01-03 20:03

    This worked for me in an older version of Velocity

    #if($velocityCount < $list.size()), #end
    

提交回复
热议问题