在速度模板中将String转换为Float

编程入门 行业动态 更新时间:2024-10-27 22:32:42
本文介绍了在速度模板中将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

本文发布于:2023-05-27 03:04:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/275501.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转换为   中将   模板   速度   Float

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!