标签: parsing velocity
//$colspan是字符串中的数字(例如$colspan="5")。在解析时,有时它会提供 NumberFormatException 。任何帮助将不胜感激。
//$colspan
$colspan="5"
#set($Integer=0) #if($Integer.parseInt($colspan)>1) //some code here..... #end
答案 0 :(得分:2)
为什么不使用VelocityTools项目中的MathTool或NumberTool。