obterCep method

String obterCep (
  1. String cep
)

Implementation

static String obterCep(String cep) {
  assert(cep.length == 8);
  return cep.substring(0, 2) +
      '.' +
      cep.substring(2, 5) +
      '-' +
      cep.substring(5, 8);
}