import 'package:intl/intl.dart';

extension XString on String {
  String get separatedByComma {
    final formatter = NumberFormat('#,###');
    final number = num.tryParse(this);
    return number != null ? formatter.format(number) : this;
  }

  String get clearComma {
    return replaceAll(RegExp(r'\D'), '');
  }
}
