From 42ddda4ae4376d1585aecaa5d704964f888168b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Fri, 17 Jun 2022 07:44:47 +0200 Subject: [PATCH] remove testYann --- src/testYann.java | 94 ----------------------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 src/testYann.java diff --git a/src/testYann.java b/src/testYann.java deleted file mode 100644 index 5850b47..0000000 --- a/src/testYann.java +++ /dev/null @@ -1,94 +0,0 @@ -class testYann{ - public static void main(String[] args) { - - - - String text = "aaaaaa aaaaaa\naaaaaa aaaaaa"; - String newText =""; - String cutLine = ""; - String newLine = ""; - - int cut = 6; - - int startC = 0; - int stoppC = cut; - - String[] s = text.split("\n"); - - for(String line : s){ - System.out.println(line); - - if(cut>line.length()-1){ - newLine =line; - } - else{ - - char[] c = new char[line.length()]; - - for(int i=0; i=startC; i--){ - if(c[i] == ' '){ - stoppC = i; - break; - } - else if(stoppC == c.length-1){ - break; - } - } - - //découper le mot - for(int i=startC;i<=stoppC;i++){ - cutLine += c[i]; - } - - newLine += cutLine+"\n"; - cutLine = ""; - - startC = stoppC + 1; - - - if(c.length-1-stoppC <=0){ - break; - } - else if(c.length-1-stoppC <= cut){ - stoppC = c.length-1; - } - else{ - stoppC += cut; - } - } - } - - newText += newLine + "\n"; - - } - - - - - - - - - - System.out.println(newText); - - - - - - } - - - - - - - -} \ No newline at end of file