CepStrip class

CEP as a digit-only value.

CEP values matching the pattern '#####-###' will have the hyphen "-" removed from them. However, if a zip value is already fully numeric, it will remain as it is. Finally, if the zip code value is malformed, then the 'null' value will be returned as an indication of a formatting error.

For example:

  • if the CEP value is '12345-678', then the return value will be '12345678';
  • if the CEP value is '87654321', then the return value will also be '87654321';
  • if the CEP value is malformed as the value '83191+060', then the return value will be the null value.

Constructors

CepStrip(String _cep)
It strips the hyfen '-' from the CEP value.
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?
CEP as a digit-only value — without the hyphen '-'.
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