strip method

String strip(
  1. String? cnpj
)

Implementation

String strip(String? cnpj) {
  RegExp regex = RegExp(r'[^\d]');
  cnpj = cnpj ?? "";

  return cnpj.replaceAll(regex, "");
}