CpfStrip class

CPF as a digit-only value.

CPFs that match the pattern '###.###.###-##' will be stripped of its two dots "." and hyphen "-". However, if a CPF is already fully numeric, it will remain as-is. Finally, if the CPF is malformed, then the null value will be returned as an indication of a formatting error.

For example:

  • if the CPF is '493.803.840-41', the return value will be '49380384041'.
  • if the CPF is '49380384041', the return value will also be '49380384041'.
  • if the CPF is a malformed value, such as 'AAB.831.918+60', then the return value will be null.

Constructors

CpfStrip(String _cpf)
Strips the CPF of its two dots '.' and hyphen '-'.
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?
CPF as a 11-digits 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