formatFromText method Null safety

String formatFromText(
  1. String value
)

Aplica el formato especĂ­fico de RUT a partir de un texto. Formatos soportados:

  • xx.xxx.xxx-@
  • x.xxx.xxx-@

Implementation

static String formatFromText(String value) {
  value = deFormat(value);
  return (value.length <= 8)
      ? _RUTValidatorUtils._shortVersionFormat(value)
      : _RUTValidatorUtils._longVersionFormat(value);
}