本文介绍了在速度模板中将String转换为Float的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎么能将字符串转换为浮点数....由于float.parseFloat()在Apache速度下不起作用....
how wud i be able to convert string into float.... as float.parseFloat() is not working in apache velocity....
#set($sum = 0.0) #set($Float = 0.0) #set($intString = "2.2") #if($!intString) #set($sum = $sum + $Float.parseFloat($intString)) #end
this is not working in velocity..
推荐答案sum = 0 . 0 ) #set( sum = 0.0) #set(
Float = 0 . 0 ) #set( Float = 0.0) #set(
intString = " 2.2" ) #if( intString = "2.2") #if(
更多推荐
在速度模板中将String转换为Float
发布评论