CnpjStrip class

CNPJ as a digit-only value.

CNPJs matching the pattern '##.###.###/####-##' will have the dots ".", slash "/", and dash "-" stripped from them; but, if a CNPJ is already entirely numeric, it remains as is. Finally, in case of a malformed CNPJ, the null value will be returned to indicate a formatting error.

For example:

  • if the CNPJ is '41.831.918/0001-60', then the return value will be '41831918000160';
  • if the CNPJ is '41831918000160', then the return value will also be '41831918000160';
  • if the CNPJ is malformed as the value 'AA.831.918+0001-60', then the return value nill be the null value.

Constructors

CnpjStrip(String _cnpj)
It strips the two dots '.', bar '/', and dash '-' from the CNPJ.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String?
CNPJ as a digit-only value — non-numeric characters are stripped from it.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited