From ac8aa5d193df2ae3217d2bf71e307421498a6377 Mon Sep 17 00:00:00 2001 From: Leonardo Brandenberger Date: Thu, 11 Nov 2021 15:47:21 +0100 Subject: [PATCH] deleted unused method --- src/TextOutput.java | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/src/TextOutput.java b/src/TextOutput.java index 6a94a63..21c868d 100644 --- a/src/TextOutput.java +++ b/src/TextOutput.java @@ -33,43 +33,6 @@ public class TextOutput { } - private void toFormatold(ArrayList text) { - for (String paragraph : text) { - String[] words = paragraph.split(" "); - int currentLength = 0; - for (String word : words) { - if (word.length() > columnWidth) { - String[] letters = word.split(""); - int letterLenght = letters.length; - int lettersPrinted = 0; - do { - currentLength = 0; - for (int i = 0; i < columnWidth; i++) { - if (letterLenght > 0) { - System.out.print(letters[lettersPrinted]); - letterLenght--; - lettersPrinted++; - currentLength++; - } - } - if (!(letterLenght == 0)) { - System.out.println(); - } - } - while (letterLenght >= columnWidth); - - } else { - if (word.length() >= columnWidth - currentLength) { - currentLength = 0; - System.out.println(); - } - System.out.print(word + " "); - currentLength += word.length() + 1; - } - } - System.out.println(); //added - } - } /** * Method to print out the paragraphs with the length taken from columnWidth and adding leftover words to the next * paragraph.