【发布时间】:2012-08-12 11:02:29
【问题描述】:
可能重复:
How can I format a String number to have commas and round?
我有一个字符串变量(即字符串格式的数字),现在我想使用逗号分隔每三位数字。我该怎么做? 我的技术是 Struts2
【问题讨论】:
-
请改写您的问题。您想在字符串中添加 comma 还是要使用 comma 来拆分/解析字符串。
-
使用string类的split()方法。