Nome e cognome con una consonante
This commit is contained in:
parent
ffd8804994
commit
8369085295
@ -53,9 +53,15 @@ public class GestisciCodiceFiscale {
|
|||||||
int secondaVocale = trovaSecondaVocale(caratteriCognome, posizionePrimaVocale);
|
int secondaVocale = trovaSecondaVocale(caratteriCognome, posizionePrimaVocale);
|
||||||
|
|
||||||
if (secondaVocale == -1) { // non c'è la seconda vocale
|
if (secondaVocale == -1) { // non c'è la seconda vocale
|
||||||
ritorno = Character.toString(caratteriCognome[posizioniConsonanti[0]])
|
if (primaVocale == 0) {
|
||||||
+ Character.toString(primaVocale)
|
ritorno = Character.toString(caratteriCognome[posizioniConsonanti[0]])
|
||||||
+ Character.toString('x');
|
+ Character.toString('x')
|
||||||
|
+ Character.toString('x');
|
||||||
|
} else {
|
||||||
|
ritorno = Character.toString(caratteriCognome[posizioniConsonanti[0]])
|
||||||
|
+ Character.toString(primaVocale)
|
||||||
|
+ Character.toString('x');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ritorno = Character.toString(caratteriCognome[posizioniConsonanti[0]])
|
ritorno = Character.toString(caratteriCognome[posizioniConsonanti[0]])
|
||||||
+ Character.toString(primaVocale)
|
+ Character.toString(primaVocale)
|
||||||
@ -226,9 +232,15 @@ public class GestisciCodiceFiscale {
|
|||||||
+ Character.toString('x')
|
+ Character.toString('x')
|
||||||
+ Character.toString('x');
|
+ Character.toString('x');
|
||||||
} else {
|
} else {
|
||||||
ritorno = Character.toString(caratteriNome[primaConsonante])
|
if (primaVocale == 0) {
|
||||||
+ Character.toString(primaVocale)
|
ritorno = Character.toString(caratteriNome[primaConsonante])
|
||||||
+ Character.toString('x');
|
+ Character.toString('x')
|
||||||
|
+ Character.toString('x');
|
||||||
|
} else {
|
||||||
|
ritorno = Character.toString(caratteriNome[primaConsonante])
|
||||||
|
+ Character.toString(primaVocale)
|
||||||
|
+ Character.toString('x');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (primaConsonante == -1) {
|
if (primaConsonante == -1) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user