removeTrailingZeros function

dynamic removeTrailingZeros(
  1. String n
)

Implementation

removeTrailingZeros(String n) {
  return n.replaceAll(RegExp(r"([.]*0+)(?!.*\d)"), "");
}