toStringMoney static method

String toStringMoney(
  1. double money
)

去掉金额的.00

Implementation

static String toStringMoney(double money) {
  String moneyNew = money.toStringAsFixed(2);
  return moneyNew.replaceAll(".00", "");
}