|
@@ -64,11 +64,9 @@ public class WxPayUtil {
|
|
|
* @return : 返回处理完的字符串
|
|
|
*/
|
|
|
public static String subZeroAndDot(String s) {
|
|
|
- if (s.indexOf(".") > 0) {
|
|
|
-
|
|
|
- s = s.replaceAll("0+?$", "");
|
|
|
-
|
|
|
- s = s.replaceAll("[.]$", "");
|
|
|
+ int dotIndex = s.indexOf(".");
|
|
|
+ if (dotIndex > 0) {
|
|
|
+ s = s.substring(0, dotIndex);
|
|
|
}
|
|
|
return s;
|
|
|
}
|