Ajouter un commentaire

thesuixx

//debarrassement des espaces doublee  //a refaire     
            for (int i = 0; i < tab_chaine.length; i++) {
                chaine = "";
                chaine = tab_chaine[i];
                tab_chaine[i] = "";
                for (int j = 0; j < chaine.length(); j++) {
                    int cont = chaine.indexOf(" ");
                    ch1 = chaine.substring(cont + 1);
                    if (ch1.indexOf(" ") == 0) {
                        ch1 = ch1.substring(1);
                    }
                    ch2 = chaine.substring(0, cont + 1);
                }
                chaine = ch2 + ch1;
// re remplissage du tableau avec les chaine sans occurences des espaces
                tab_chaine[i] = chaine;
            }

D'apres ce que j'ai compris, tu veux enlever tout les espaces du string contenu dans tab_chaine[i]
il suffit de faire:
for (int i = 0; i < tab_chaine.length; i++) {
                tab_chaine[i] = tab_chaine[i].replaceAll(" ", "");
            }

Pour les autres problemes, j'ai regardé ton code que tres rapidement donc je peux pas encore te donner de solution maintenant

Filtered HTML

Plain text

CAPTCHA
Cette question permet de vérifier que vous n'êtes pas un robot spammeur :-)
 L     N   N  FFFF  PPPP   N   N 
L NN N F P P NN N
L N N N FFF PPPP N N N
L N NN F P N NN
LLLL N N F P N N