Skip to content
caarlos0 edited this page Apr 23, 2012 · 3 revisions

Formatadores

Formatando...

Formatter formatter = new NITFormatter();  
String unfotmatedValue = "17033259504";  
String formatedValue = formatter.format(unfotmatedValue );  
// formatedValue = "170.33259.50-4" ;  

Removendo formatação...

Formatter formatter = new NITFormatter();  
String fotmatedValue = "170.33259.50-4";  
String unformatedValue = formatter.unformat(fotmatedValue );  
// unformatedValue = "17033259504" ;  

Lista de todos os formatadores

  • CPFFormatter
  • CNPJFormatter
  • NITFormatter
Clone this wiki locally