comma method

String comma()

Implementation

String comma() {
  return toString().replaceAllMapped(RegExp(r'(\d+)(\d{3})'), (Match m) {
    return '${m[1]},${m[2]}';
  });
}