Ciao a tutti,
ho la necessità in un flusso di informazioni di cambiare le lettere accentate con le lettere normali.
Ho creato il seguente metodo per porre una soluzione veloce.
Mi rendo conto che non è il metodo più veloce e nel caso mi dimentico un carattere verrà e immesso nel flusso di informazioni e questa mi ritornerà un errore.codice:public static String FindAndSubstitution(String word){ String wordChanged=word; wordChanged=wordChanged.replace('Ç', 'C'); wordChanged=wordChanged.replace('ü', 'u'); wordChanged=wordChanged.replace('é', 'e'); wordChanged=wordChanged.replace('â', 'a'); wordChanged=wordChanged.replace('ä', 'a'); ..... ..... wordChanged=wordChanged.replace('Ñ', 'N'); return wordChanged; }
C'è un metodo più veloce per poter fare questa cosa?
Grazie mille.
Ciao.

Rispondi quotando