private static List <Centena> QuebrarCentenas(string texto) { int quantidadeCentenas = QuantidadeCentenas(texto); var centenas = new List <Centena>(); for (int i = quantidadeCentenas; i >= 1; i--) { int indiceInicial = BuscarIndiceInicialCentena(i, texto); int tamanhoCentena = BuscarTamanhoCentena(i, texto); string centenaTexto = texto.Substring(indiceInicial, tamanhoCentena); var centena = new Centena(centenaTexto); centenas.Add(centena); } return(centenas); }
private static List<Centena> QuebrarCentenas(string texto) { int quantidadeCentenas = QuantidadeCentenas(texto); var centenas = new List<Centena>(); for (int i = quantidadeCentenas; i >= 1; i--) { int indiceInicial = BuscarIndiceInicialCentena(i, texto); int tamanhoCentena = BuscarTamanhoCentena(i, texto); string centenaTexto = texto.Substring(indiceInicial, tamanhoCentena); var centena = new Centena(centenaTexto); centenas.Add(centena); } return centenas; }