string.format

四舍五入

string.Format("{0:f0}",12.555)
<=>
select round(12.555,0)

去掉无效的小数

string.Format("{0:0.##}",12.550)

 

posted @ 2018-08-01 15:11  自由的鱼  阅读(197)  评论(0编辑  收藏  举报